CCCPaste

Godot 4 HTML Apache error fix

#If when exporting to html in Godot 4
#you receive this error in your web browser
#and you use apache web server
--------------------------------------------------------------------------------
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)
--------------------------------------------------------------------------------

#add this to your .htaccess file 

Header set Cross-Origin-Embedder-Policy: require-corp
Header set Cross-Origin-Opener-Policy: same-origin


#and run these commands
sudo apache2ctl -M
sudo a2enmod headers
sudo systemctl restart apache2