removed adding headers if empty
This commit is contained in:
parent
c1710a53c1
commit
e7a40530ac
1 changed files with 4 additions and 2 deletions
|
@ -110,8 +110,10 @@ func ensureApigeeClientID(next http.Handler) http.HandlerFunc {
|
|||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var apigeeClientID string
|
||||
apigeeClientID = currentApigeeClientID(r)
|
||||
ctx := metadata.AppendToOutgoingContext(r.Context(), apigeeClientIDHeaderName, apigeeClientID)
|
||||
r = r.WithContext(ctx)
|
||||
if apigeeClientID != "" {
|
||||
ctx := metadata.AppendToOutgoingContext(r.Context(), apigeeClientIDHeaderName, apigeeClientID)
|
||||
r = r.WithContext(ctx)
|
||||
}
|
||||
next.ServeHTTP(w, r)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue