MCPcopy Create free account
hub / github.com/zalando/skipper / copyHeaderExcluding

Function copyHeaderExcluding

proxy/proxy.go:544–552  ·  view source on GitHub ↗
(to, from http.Header, excludeHeaders map[string]bool)

Source from the content-addressed store, hash-verified

542}
543
544func copyHeaderExcluding(to, from http.Header, excludeHeaders map[string]bool) {
545 for k, v := range from {
546 // The http package converts header names to their canonical version.
547 // Meaning that the lookup below will be done using the canonical version of the header.
548 if _, ok := excludeHeaders[k]; !ok {
549 to[http.CanonicalHeaderKey(k)] = v
550 }
551 }
552}
553
554func cloneHeader(h http.Header) http.Header {
555 hh := make(http.Header)

Callers 1

cloneHeaderExcludingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…