Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

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

$
0
0
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 0.0.0.0/0" ?

for example:

geo $geo {
default ZZ;
proxy 0.0.0.0/0;

127.0.0.1/32 RU;
192.168.0.1/32 UK;
...
}

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>