From f8605bcd3c4aa40e2d0ed30131e6028cd3fc51ee Mon Sep 17 00:00:00 2001 From: Lenny Date: Fri, 24 Apr 2026 16:37:19 +0200 Subject: [PATCH] fix: Thoth geoip compare (#1564) Co-authored-by: Jason Cameron --- docs/docs/CHANGELOG.md | 1 + lib/thoth/geoipchecker.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index 2d7f70a5..782daa34 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed mixed tab/space indentation in Caddy documentation code block - Improve error messages and fix broken REDIRECT_DOMAINS link in docs ([#1193](https://github.com/TecharoHQ/anubis/issues/1193)) - Add Bulgarian locale ([#1394](https://github.com/TecharoHQ/anubis/pull/1394)) +- Fixed case-sensitivity mismatch in geoipchecker.go - Fix CEL internal errors when iterating `headers`/`query` map wrappers by implementing map iterators for `HTTPHeaders` and `URLValues` ([#1465](https://github.com/TecharoHQ/anubis/pull/1465)). - Enable [metrics serving via TLS](./admin/policies.mdx#tls), including [mutual TLS (mTLS)](./admin/policies.mdx#mtls). - Enable [HTTP basic auth](./admin/policies.mdx#http-basic-authentication) for the metrics server. diff --git a/lib/thoth/geoipchecker.go b/lib/thoth/geoipchecker.go index ef6dcb88..3f06be85 100644 --- a/lib/thoth/geoipchecker.go +++ b/lib/thoth/geoipchecker.go @@ -18,7 +18,7 @@ func (c *Client) GeoIPCheckerFor(countries []string) checker.Impl { var sb strings.Builder fmt.Fprintln(&sb, "GeoIPChecker") for _, cc := range countries { - countryMap[cc] = struct{}{} + countryMap[strings.ToLower(cc)] = struct{}{} fmt.Fprintln(&sb, cc) }