[WebGL, Safari] indexedDB access denied in iframe

When I download my application directly on my site, everything works, but when I try to download it in the iframe, it gives an error:
indexedDB database could be opened.
[CachedXMLHttpRequest] IndexedDB access denied

It works in windows but does not work on macos in the safari browser.

How can I fix this? I need the application to work through iframe to post on a social network.

You can’t, it’s a bug: Unity Issue Tracker - [WebGL] CachedXMLHttpRequest.js prevents all web requests from functioning when indexDB throws an exception on indexedDB.open

Note though you will never be able to save to the indexDB (cache files) with Safari in a cross-domain environment. Users will always have to load the files fresh.