MCPcopy Create free account
hub / github.com/prometheus/common / HTTPHeader

Method HTTPHeader

config/config.go:44–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42type ProxyHeader map[string][]Secret
43
44func (h *ProxyHeader) HTTPHeader() http.Header {
45 if h == nil || *h == nil {
46 return nil
47 }
48
49 header := make(http.Header)
50
51 for name, values := range *h {
52 var s []string
53 if values != nil {
54 s = make([]string, 0, len(values))
55 for _, value := range values {
56 s = append(s, string(value))
57 }
58 }
59 header[name] = s
60 }
61
62 return header
63}
64
65// DirectorySetter is a config type that contains file paths that may
66// be relative to the file containing the config.

Callers 2

TestHeaderHTTPHeaderFunction · 0.80
GetProxyConnectHeaderMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestHeaderHTTPHeaderFunction · 0.64