Skip to content

Repository files navigation

Traefik plugin for MaxMind GeoIP

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: true config
  • 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-For header and, if it's not there, it takes it from req.remoteAddr
  • I had issues with Traefik not using the correct IP in X-Real-IP, so there's also a flag setRealIP: true that resets the header to the IP found in X-Forwarded-For.

Traefik plugin that registers a custom middleware for getting data from MaxMind GeoIP databases and pass it downstream via HTTP request headers.

Supports both GeoIP2 and GeoLite2 databases.

Docs are TBD!

About

No description or website provided.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages