diff --git a/interceptors/realip/realip.go b/interceptors/realip/realip.go index bc9350964..8d5a0214e 100644 --- a/interceptors/realip/realip.go +++ b/interceptors/realip/realip.go @@ -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 {