Howto set variable base on header content

Vincent MAUGE vmauge at
Wed Jul 7 17:37:11 MSD 2010


I get nginx as reverse proxy. I want to set a variable base on
X-Forwarded-For like I can do with geo module. What is the proper way
to do that ?
The purpose is to change some behavior base on the original client
even if he is behind a proxy. I need to be able to set two different
behavior for two different original IP even if the use the same proxy.
Currently with geo module, I can only change the behavior if the
source ip in the tcp connection is different.



More information about the nginx mailing list