enable-cors.org
enable-cors.org copied to clipboard
serve the way w3c sez to do it
The previous version of the nginx configs did not follow the recommendations of the w3c and as a result some clients would balk at the headers being served. This PR fixes issue #102.
--timball
feedback taken. code adjusted.
--timball
pull code ?
Sorry I'm traveling these past two weeks. I'll try to get to this by the end of this week.
On Mon, Jun 22, 2015 at 10:17 PM timball [email protected] wrote:
pull code ?
— Reply to this email directly or view it on GitHub https://github.com/monsur/enable-cors.org/pull/103#issuecomment-114339380 .
So what is the current status of permissive CORS setup for nginx, @monsur? I skimmed through all suggestion for past 6 years and this is what I found:
- add_header
always
parameter needed - Change
Access-Control-Allow-Origin
to$http_origin
in order to support cross-origin authentication throughAccess-Control-Allow-Credentials: true
header - Get rid of ifs inside location blocks (https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/)?
- Optionally add instructions for alternative way using
ngx_headers_more
module - Add warnings why this wide-open CORS configuration is dangerous