Control Web Panel
WebPanel => CentOS 7 Problems => Topic started by: f3biz on May 29, 2024, 09:46:00 AM
-
Hi to all, I have an problem on one website where ttf file is blocked by CORS policy
The error is follow: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I have solved it adding this line add_header Access-Control-Allow-Origin *;
into the vhost conf gfile of related domain
Now I want to know how I can set it into nginx or cwp conf file?
I want this line of code to be inserted automatically every time a vhost.conf file is regenerated
Anyone can tell me where add this line of code?
-
WebServer Settings > WebServers Domain Conf
Add/Edit configuration
Note the nginx default vhost template. You would add it to whichever template you are using (such as force-https-http2).