Headers set in http {} go missing after setting headers in location {}

nano nginx-forum at nginx.us
Sun Mar 10 04:02:09 UTC 2013

Here is my nginx configuration

My nginx -V is:
nginx version: nginx/1.2.7
built by gcc 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
TLS SNI support enabled

I noticed that when I had headers (add_header) in the http{ } block, those
headers were not being displayed when another add_header was placed in a
location{ } block.

How can I have global headers sent to the client, and send additional
headers when the client reaches a location block?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,237172,237172#msg-237172

More information about the nginx mailing list