GODOT 4.0 / HTML5 Export / CORS
Since this looks to be a mini-tutorial/guidance post I'll tag it appropriately. Thanks for the contribution. ️
Thanks, people keep asking about this. Very helpful.
does this work with itch io?
You need to change these settings if you're hosting on your own server. Itch has an experimental option to do this, but in my experience it only worked well on Chrome.
KayfallWaterfall I do not know the possibilities to parameterize itch io server ( and which kind of server are behind itch io).
I have only test that on hostinger (Single Web Hosting solution) : behind it, it is a litespeed web server (an lightweight apache server system).
Itch is a gaming platform, they don't give you access to the server variables. However they have beta support for this in a check box (I think it's called enable experimental shared buffer).
KayfallWaterfall Hi, I found this tuto.
If it can help...
- Edited
Using this code I'm facing "Domain Refused Connection” error. what should I do?
KianHsn this code
Please explain in more detail.
DaveTheCoder
Trying to fix the error above to run my Godot project, I used the code below like said:
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
Header set Cross-Origin-Embedder-Policy "require-corp"
Header set Cross-Origin-Opener-Policy "same-origin"
</IfModule>
But when I want to run my game, I still encounter an error that says my domain refused connection and I don't know what should I do.
On my web server account, which runs Apache and permits .htaccess files, I created an .htaccess file with these contents, and it fixed the problem reported in the initial post of this thread:
Header set Cross-Origin-Opener-Policy "same-origin"
Header set Cross-Origin-Embedder-Policy "require-corp"
However, Godot 4 HTML5 exports require the HTTPS protocol, and I don't have a security certificate, so a user visiting the page gets a warning message about the missing certificate.
The above problems are avoided when I upload the project to itch.io.