On Thu, Aug 14, 2014 at 10:16:43AM -0400, bodomic wrote:
Hi there,
> Actually, the second problem is described in this document too, I think I
> should re-read it every time I want to use IF.
"if" is fine.
It is only "if inside location" which needs care.
My general guideline is:
do "return .
Actually, the second problem is described in this document too, I think I
should re-read it every time I want to use IF.
In my example (before posting it here) I've dropped the second IF in the
same location without much thought.
That's why it worked for you. That's why it worked in a separate loca
Thanks for your reply, I've actually found the second traitor (i.e. why
second example won't work), will reply to Francis's post once more.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,252523,252574#msg-252574
___
nginx mailing list
nginx@n
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 prob
Hi Francis,
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
m
On Wed, Aug 13, 2014 at 02:28:27AM -0400, bodomic wrote:
Hi there,
> Hi all, I've got strange behavior that I don't understand in two different
> configs. I'll post examples below, in both of them I use add_header two
> times and one of them is not working while second does.
>
> Example 1:
> Req
Hi all, I've got strange behavior that I don't understand in two different
configs. I'll post examples below, in both of them I use add_header two
times and one of them is not working while second does.
Example 1:
Request is: http://hostname/?region=XX
#This location adds header, so it's frankly