As the tests I conducted (using Java API to read GeoIP.dat
, as well as local test) might be insufficient, I was wondering what happens on NginX when geo-ip module is configured, and when no IP to Country mapping is found..?
Example results using Java API:
151.38.39.114 -> IT
12.25.205.51 -> US
0.0.0.0 -> --
127.0.0.1 -> --
So, if I do this:
proxy_set_header GeoIP-CountryCode $geoip_country_code;
shall I also get '--'
as the result, from NginX, or blank/null string, or something else when the mapping for the real IP might be missing (if at all possible..)?
(Side note: when testing this from local addresses such as 127.0.0.1
or 192.168.x.x
, Header value was always empty (null))