I need to apply the following CORS headers so I can use sharedArrayBuffer which is required by FFMPEG.
<IfModule mod_headers.c>
Header set Cross-Origin-Embedder-Policy "require-corp"
Header set Cross-Origin-Opener-Policy "same-origin"
</IfModule>
With this code in my .htaccess I am able to use sharedArrayBuffer (great) but now I cannot load data from firebase, it is blocked.
net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep 200 (OK)
I have tried creating a cors.json to allow firebase storage, but it still does not work.
[
{
"origin": ["https://mydomain.io"],
"responseHeader": ["Content-Type", "Authorization"],
"method": ["GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS"],
"maxAgeSeconds": 3600
}
]
I also tried to apply the headers only on the /register route which is where I need the headers applied, but it still does not work even though if i do a curl request to that url it shows the headers are set?
I am very confused and not too familiar with writing code on the server with .htaccess, but I’ve not been able to crack this after many days of trying.
I hope someone can guide me the right direction!