Proxy requests that return a 403 error - issue with sending headers

Francis Daly francis at daoine.org
Fri Mar 16 12:23:12 UTC 2018


On Fri, Mar 16, 2018 at 11:20:31AM +0000, Friscia, Michael wrote:

Hi there,

> First of all, your response caused me to review everything and I was able to solve it with you kicking me in the right direction.

Good that you have it solved now.

> Yes, I’m well aware of the header inheritance but made a fatal mistake. I thought this only applied to add_header and not proxy_set_header

It applies to (almost) every directive -- either "inherited fully", or
"not inherited at all".

> So regardless that it is working now, why is it that on a 200 response the inheritance rule did not apply and when the response was 403 it did? I’m just going to change the way my configurations are setup but it seems like there’s a potential bug unless I’m just missing something really obvious when it comes to 4xx responses.
> 

At the time nginx makes the proxy_pass request to upstream, it does not
know what the response will be. So it cannot request differently based on
the response.

Show a config that does not act the way you want, if you want help with
that config.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list