{"id":22281553,"url":"https://github.com/shift72/caddy-geo-ip","last_synced_at":"2025-07-28T20:31:04.241Z","repository":{"id":42771031,"uuid":"462497507","full_name":"shift72/caddy-geo-ip","owner":"shift72","description":"Implements a Geo IP Lookup using the Maxmind IP Database","archived":false,"fork":false,"pushed_at":"2022-03-15T21:58:59.000Z","size":79,"stargazers_count":17,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-20T14:24:00.832Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shift72.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-22T22:34:11.000Z","updated_at":"2024-05-18T08:11:16.000Z","dependencies_parsed_at":"2022-08-12T10:10:35.610Z","dependency_job_id":null,"html_url":"https://github.com/shift72/caddy-geo-ip","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shift72%2Fcaddy-geo-ip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shift72%2Fcaddy-geo-ip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shift72%2Fcaddy-geo-ip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shift72%2Fcaddy-geo-ip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shift72","download_url":"https://codeload.github.com/shift72/caddy-geo-ip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227952687,"owners_count":17846391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T16:19:18.701Z","updated_at":"2024-12-03T16:19:19.409Z","avatar_url":"https://github.com/shift72.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GeoIP\n\nProvides middleware for resolving a users IP address against the Maxmind Geo IP Database.\n\nManages Downloading and Refreshing the Maxmind Database via https://github.com/maxmind/geoipupdate\n\n## Examples\n\n```\n\n{\n  http_port     8080\n  https_port    8443\n  order geo_ip first\n}\n\nlocalhost:8080 {\n\n  geo_ip {\n    db_path GeoLite2-Country.mmdb\n    trust_header X-Real-IP\n  }\n\n  respond / 200 {\n    body \"Hello from {geoip.country_code}\"\n  }\n}\n\n```\n\n## Configuration\n\n`account` - this is the Maxmind Account, required for all download operations. Can be supplied as an ENV Variable `GEO_ACCOUNT_ID`.\n\n`db_path` - is the path to load the database from. The filename is used to determine the edition of the file to download\n     Valid values tested with are GeoIP2-Country | GeoLite2-Country\n\n`trust_header` - this is used to determine the header to load the users ip address from, if empty it will use the requests `RemoteAddr`\n\n`api_key` - this is a Maxmind API Key. If blank no attempt will be made to download the database.  Can be supplied as an ENV Variable `GEO_API_KEY`.\n\n`download_frequency` - this is how often to download the database from the Maxmind Server (requires an APIKey)\n\n`reload_frequency` - this is how often to check for updated versions of the database on disk. This can be used when an external process is responsible for downloading the database. If the database is being managed via the `api_key` and `download_frequency` then there is no need\nto specify the `reload_frequency`\n\n`override_country_code` - this setting allows for the country code to be configured for local development. It will attempt to use the database if there is one, and use the value if no record could be found.\n\n## Release Process\n\n```\ngit tag v0.4.0\ngit push origin v0.4.0\n```\n\n## Builds on the good work by\n\nhttps://github.com/porech/caddy-maxmind-geolocation\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshift72%2Fcaddy-geo-ip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshift72%2Fcaddy-geo-ip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshift72%2Fcaddy-geo-ip/lists"}