By renzobiffa
Can´t make Access-Control-Allow-Origin “" working, I have done the setup for making .htaccess working right, I know it´s working right because ErrorDocument 404 is working perfect, but: Header set Access-Control-Allow-Origin "” is not. I have added Header set Access-Control-Allow-Origin “*” inside etc/apache2/sites-available/000-default.conf but nothing, can you help me with this? thanks, I have read all the related support about this, tried everything but nothing.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Thanks. It works! Setting this header -
Header always set Access-Control-Allow-Origin "*"
in apache.config file and then enabling the mod_headers module and restarting the apache2 using -
sudo a2enmod headers
sudo service apache2 reload
worked for me.
The mod_headers module could be disabled. Try enabling it and reload Apache.
sudo a2enmod headers
sudo service apache2 reload
If you still don’t see the header try adding it to your .htaccess file:
Header set Access-Control-Allow-Origin "*"
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.