Welcome! Log In Create A New Profile

Advanced

add_header

June 21, 2017 03:50PM
Hi folks,

As a precaution against CORS, I

add_header Access-Control-Allow-Origin *;

outside any location{} block in my server{} definition.

I have recently had a problem where I deliver .css via a CDN, and that
CDN references font files also on the CDN, and this was triggering CORS,
so the font wasn't loaded.

The solution was to also add that header to the location{} block that I
use to manage the relevant static resources.

This seems rather strange. Is it supposed to work this way?

Cheers,

Steve

--
Steve Holdoway BSc(Hons) MIITP
https://www.greengecko.co.nz/
Linkedin: https://www.linkedin.com/in/steveholdoway
Skype: sholdowa

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

add_header

GreenGecko June 21, 2017 03:50PM

Re: add_header

Reinis Rozitis June 21, 2017 04:36PM

Re: add_header

GreenGecko June 21, 2017 04:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready