Use SplitSeq in clientip forwarded header parser
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user