5 ms·
this service does a lot more than just return your remote_ip, which wont work behind a load-balancer or other proxy unless you configure realip module. and als
by VWWHFSfQ 6y ago
this service does a lot more than just return your remote_ip, which wont work behind a load-balancer or other proxy unless you configure realip module. and also need to add geoip module to do all the location stuff
- nerdponx 6y agoGood points both. That said, do you know of any software library that exposes the Geoip database (or at least Geoip Lite which you one easily obtain for free) in a nice API? Like how a lot of programming languages have tzinfo/tzdata libraries for querying the Tz database.
- cryvate1284 6y agoMaxmind do APIs for a bunch of language. I've used the python one and it works well (with Lite), but see here their list: https://dev.maxmind.com/geoip/geoip2/web-services/ https://dev.maxmind.com/geoip/geoip2/web-services/
- nerdponx 6y agoI should clarify that I was looking for an "offline" API/library that I can use against a local copy of the Lite database, but this is great stuff too.
- luhn 6y agoNot sure what language you're looking for, but those exist too. Here's a Python one: https://maxminddb.readthedocs.io/en/latest/ https://maxminddb.readthedocs.io/en/latest/
- cryvate1284 6y agoIf you click through one of the links (e.g. Python) you will see it does allow you to do so! https://pypi.org/project/geoip2/ https://pypi.org/project/geoip2/
- stevenicr 6y agoI thought maxmind has some kind of terms change that forced account signup and some other issues 'because of some privacy law' like gdpr - maybe the Cali one? So it has ruined my second favorite wordpress security plugin - and MaxMind not really usable like it once was (?)
- banana_giraffe 6y agoMaxMind offers a small version of their database API for free: https://dev.maxmind.com/geoip/geoip2/geolite2/ https://dev.maxmind.com/geoip/geoip2/geolite2/ In practice it's good enough for many purposes. It's actually the version of the database that ifconfig.co uses.
- jesterson 6y agonginx with GeoIP2 module does exactly same for me for years by now.