Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 11, 17:15 UTC
caddyhttp: Use case-insensitive comparison for large Host lists
Matthew Holt committed
Feb 9, 2026 at 14:18 UTC
1f43e8566b4c1d66a00a138188f0defc5adc6d75
1 file changed
+1
-1
modules/caddyhttp/matchers.go
+1
-1
@@ -319,7 +319,7 @@ func (m MatchHost) MatchWithError(r *http.Request) (bool, error) {
319
}
320
return m[i] >= reqHost
321
})
322
- if pos < len(m) && m[pos] == reqHost {
322
+ if pos < len(m) && strings.EqualFold(m[pos], reqHost) {
323
return true, nil
324
}
325
}