Welcome! Log In Create A New Profile

Advanced

Re: add_header is not working in certain locations

August 14, 2014 09:24AM
Adding a few notes:
IF should only be used to return a state, ea. if ... 'error_page' and nothing else because it breaks the chain of processing, when you really need IF's, nested, setting values or otherwise use Lua.
For example: http://forum.nginx.org/read.php?2,251650,251777#msg-251777

The problem lays in event processing, while events are processed a single IF won't do much harm (if ever) but additional IF's can cause strange things,

Event1 -> EP1 -> EP2 -> IF1 -> goto EP3 or EP4 -> IF2 (refers to the stage between EP1 and EP2) so you are passed EP2 already when another IF is thrown in, this may result in a loopback to EP2 which may end up at EP3 while your IF1 wanted to go to EP4. Or IF2 processing produced a result which overwrites the result of IF1.
Subject Author Posted

add_header is not working in certain locations

bodomic August 13, 2014 02:28AM

Re: add_header is not working in certain locations

Francis Daly August 13, 2014 07:34PM

Re: add_header is not working in certain locations

bodomic August 14, 2014 08:50AM

Re: add_header is not working in certain locations

itpp2012 August 14, 2014 09:24AM

Re: add_header is not working in certain locations

bodomic August 14, 2014 10:07AM

Re: add_header is not working in certain locations

bodomic August 14, 2014 10:16AM

Re: add_header is not working in certain locations

Francis Daly August 14, 2014 01:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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