()
| 42 | type ProxyHeader map[string][]Secret |
| 43 | |
| 44 | func (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. |
no outgoing calls