Use SplitSeq in clientip forwarded header parser

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-14 17:24:04 +04:00
parent 713623c7c0
commit 8f2426602b

View File

@@ -81,7 +81,7 @@ func parseForwardedFor(header string) string {
header = header[:i]
}
for _, part := range strings.Split(header, ";") {
for part := range strings.SplitSeq(header, ";") {
part = strings.TrimSpace(part)
if !strings.HasPrefix(strings.ToLower(part), "for=") {
continue