Yeah I know, this question again. But with a twist this time !
I managed to host my game on a simple Firebase Hosting, on which I added the proper headers :
"headers": [
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Cross-Origin-Embedder-Policy",
"value": "require-corp"
},
{
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin"
}
]
You can see it working here : https://godot-games-24c5d.web.app/game/game.html
Now I have a separate singlepage application (also hosted on Firebase, but in its own project), on which I would like to embed this game via an iframe, but when I add :
<iframe src="https://godot-games-24c5d.web.app/game/game.html" frameborder="0"></iframe>
I get the famous
Error The following features required to run Godot projects on the Web are missing: Cross Origin Isolation - Check web server configuration (send correct headers) SharedArrayBuffer - Check web server configuration (send correct headers)
And I can't set the same headers to my singlepage app (the one containing the iframe) because it causes so many problems (with images, external scripts etc).
Any guidance here ? Thanks !
Bonus : my game uses JavaScriptBridgeto send message via postMessage to the iframe parent, (so I can react to some in-game events from the singlepage app that have the iframe). Will this work ?