Welcome! Log In Create A New Profile

Advanced

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

Francis Daly
March 10, 2013 06:28AM
On Sat, Mar 09, 2013 at 11:02:09PM -0500, nano wrote:

Hi there,

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

The short version is "you can't".

The longer version is "you can, but you have to configure it the
nginx way". Which means that in the final parsed nginx.conf, all the
add_header directives that you want to apply to a request are at the
same inheritance level.

You can "include" a file containing global ones wherever you set local
ones; or you can use a macro language to do that for you when creating
nginx.conf.

f
--
Francis Daly francis@daoine.org

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

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

nano March 09, 2013 11:02PM

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

nano March 09, 2013 11:05PM

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

Francis Daly March 10, 2013 06:28AM

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

nano March 10, 2013 01:49PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
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