Skip to content

Instantly share code, notes, and snippets.

@RANUX
Last active October 7, 2021 21:46
Show Gist options
  • Save RANUX/70b9f7f680d81a82c3aebf8861ece3a7 to your computer and use it in GitHub Desktop.
Save RANUX/70b9f7f680d81a82c3aebf8861ece3a7 to your computer and use it in GitHub Desktop.
Server settgins for godot web editor with hestia cp

Enable mod_headers

a2enmod headers
systemctl restart apache2

put .htaccess to public_html

DirectoryIndex godot.tools.html

<IfModule mod_headers.c>
  Header always append X-Frame-Options SAMEORIGIN
  Header set Access-Control-Allow-Origin "*"
  Header set Cross-Origin-Embedder-Policy require-corp
  Header set Cross-Origin-Opener-Policy same-origin
  Header set Cross-Origin-Resource-Policy same-origin
</IfModule>

edit /etc/nginx/conf.d/domains/your.host.com.ssl.conf

location / {
....
  add_header X-Frame-Options SAMEORIGIN;
  add_header Access-Control-Allow-Origin "*";
  add_header Cross-Origin-Embedder-Policy require-corp;
  add_header Cross-Origin-Opener-Policy same-origin;
  add_header Cross-Origin-Resource-Policy same-origin;
 ......
 }

Restart nginx: systemctl restart nginx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment