Page 2 of 2

Re: How do I add Access-Control-Allow-Origin in vestacp? cors

Posted: Thu Sep 21, 2017 2:28 pm
by skurudo
youradds wrote:You shouldn't be editing the nginx.conf file directly!!!! Always edit the templates:
/usr/local/vesta/data/templates/web
Andy, good point! Always better use templates.

Re: How do I add Access-Control-Allow-Origin in vestacp? cors

Posted: Mon Mar 29, 2021 7:38 pm
by americanninja
Thanks skurudo!

Can you please elaborate on how to do this?

I have the same issue as the thread starter. I was advised by my Wordpress Theme provider to enable CORS as it's blocking access to some font due to No "access-control-allow-origin' header present.

So how can this be fixed. Do I create an empty config file in that use director you provided under nginx and add the lines of code advised earlier in this thread.
It would be great if someone could help clearly explain the proper way to fix this, so that I can change this on my site and others that come across this thread can fix their site on their own as well. Thanks!