This is a modified version of GiGInnovationLabs/traefikgeoip2 that changes the following:
- Logs are hidden by default, and can be displayed by setting the
debug: trueconfig - It adds latitude, longitude, geohash, and the country name (moving the country code to CountryCode)
- It removes the
X-from the header names, per RFC 6648. - It adds support for
excludeIPs, a config that takes IPs and CIDRs that will be excluded from checks - It doesn't add a header if its value could not be determined
- To get the client's IP, it looks for it first in the
X-Forwarded-Forheader and, if it's not there, it takes it fromreq.remoteAddr - I had issues with Traefik not using the correct IP in
X-Real-IP, so there's also a flagsetRealIP: truethat resets the header to the IP found inX-Forwarded-For.
Traefik plugin that registers a custom middleware for getting data from MaxMind GeoIP databases and pass it downstream via HTTP request headers.