enable-cors.org icon indicating copy to clipboard operation
enable-cors.org copied to clipboard

Nginx > add_header missing "always"

Open ebuildy opened this issue 10 years ago • 4 comments
trafficstars

By default, Nginx add_header directive does not work if HTTP status code is 40x or 50x. To make it work regardless status code, you must add always at the end.

ebuildy avatar Jul 10 '15 11:07 ebuildy

@monsur does this need any help to get over the finish line?

ralph-tice avatar Apr 16 '17 17:04 ralph-tice

Thanks Ralph. Does the implementation here look reasonable (or does it need "always" as well)?

monsur avatar Apr 19 '17 02:04 monsur

The additional verbs and "always" are good in #116, but it needs the regex approach instead of using "||"

ralph-tice avatar Apr 19 '17 04:04 ralph-tice

2019 now and I spend 2 days solving issue with 401 error not getting 'access-control-allow-origin'. Please add "always".

yoldar avatar Sep 22 '19 12:09 yoldar