add_header is not working in certain locations
nginx-forum at nginx.us
Thu Aug 14 12:50:07 UTC 2014
Thanks for your thoughtful entry. It seems that it is a cloudy area of buggy
'if' behaviors :)
I've created empty host config with just 'location /' and 'if ...
add_header' and proxy_pass - and it works fine.
I'll have to retest this situation on my real server though to find out if
my 'issue' is gone.
As for the second case - yes, it looks like the whole set of
http://wiki.nginx.org/IfIsEvil#Examples so I think that's the case of buggy
I'll try the 'What to do instead' section. But, funny to notice, in my case
try_files *does* work, while 'if' does not in the same location.
Config of Nginx for Drupal is here: http://wiki.nginx.org/Drupal
I'm using it literally from there, just trying to add a buggy 'if' here and
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,252523,252571#msg-252571
More information about the nginx