Skip to content

Commit

Permalink
force lowercase when checking header
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsRC committed Dec 9, 2023
1 parent d9b9e29 commit dd281fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions interceptors/realip/realip.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ func getHeader(ctx context.Context, key string) string {
return ""
}

if md[key] == nil {
if md[strings.ToLower(key)] == nil {
return ""
}

return md[key][0]
return md[strings.ToLower(key)][0]
}

func ipFromHeaders(ctx context.Context, headers []string) netip.Addr {
Expand Down

0 comments on commit dd281fa

Please sign in to comment.