mirror of
https://github.com/hanzoai/krakend-otel.git
synced 2026-09-30 22:49:38 +00:00
fix: skip headers capitalization
This commit is contained in:
@@ -2,6 +2,7 @@ package client
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/textproto"
|
||||
"strings"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
@@ -46,7 +47,8 @@ func newTransportTraces(tracesOpts *TransportTracesOptions, tracer trace.Tracer,
|
||||
if len(tracesOpts.SkipHeaders) > 0 {
|
||||
sh = make(map[string]bool, len(tracesOpts.SkipHeaders))
|
||||
for _, v := range tracesOpts.SkipHeaders {
|
||||
sh[v] = true
|
||||
canonical := textproto.CanonicalMIMEHeaderKey(v)
|
||||
sh[canonical] = true
|
||||
}
|
||||
}
|
||||
return &transportTraces{
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/textproto"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/propagation"
|
||||
@@ -93,7 +94,8 @@ func NewTrackingHandlerWithTrustedProxies(next http.Handler, trustedProxies []st
|
||||
if len(gCfg.SkipHeaders) > 0 {
|
||||
sh = make(map[string]bool, len(gCfg.SkipHeaders))
|
||||
for _, v := range gCfg.SkipHeaders {
|
||||
sh[v] = true
|
||||
canonical := textproto.CanonicalMIMEHeaderKey(v)
|
||||
sh[canonical] = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package lura
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"net/textproto"
|
||||
"strings"
|
||||
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
@@ -36,7 +37,8 @@ func newMiddlewareTracer(s state.OTEL, name string, stageName string, reportHead
|
||||
if len(skipHeaders) > 0 {
|
||||
sh = make(map[string]bool, len(skipHeaders))
|
||||
for _, k := range skipHeaders {
|
||||
sh[k] = true
|
||||
canonical := textproto.CanonicalMIMEHeaderKey(k)
|
||||
sh[canonical] = true
|
||||
}
|
||||
}
|
||||
return &middlewareTracer{
|
||||
|
||||
Reference in New Issue
Block a user