Geo Module. How to make nginx to check proxy for any ip?

Maxim Dounin mdounin at
Fri Mar 15 10:02:26 UTC 2013


On Fri, Mar 15, 2013 at 04:24:13AM -0400, varan wrote:

> I mean I haven't got full list of ip addresses that can be proxy, so I want
> nginx to look X-FORWARDED-FOR header for any ip address, and if the header
> exists to determine geo using the header. If there's no X-Forwarded-For
> header, then use ip address for geo.
> is it acceptable to use "proxy" ?
> for example:
> geo $geo {
>     default        ZZ;
>     proxy;
>   RU;
> UK;
>     ... 
> }

This will work, but it means that anybody will be able to easily 
fool your geo detection.

Maxim Dounin

More information about the nginx mailing list