(origin, override http.Header)
| 211 | return nil |
| 212 | } |
| 213 | func ProcessHeader(origin, override http.Header) http.Header { |
| 214 | result := http.Header{} |
| 215 | // client header |
| 216 | for h, val := range origin { |
| 217 | if utils.SliceContains(conf.SlicesMap[conf.ProxyIgnoreHeaders], strings.ToLower(h)) { |
| 218 | continue |
| 219 | } |
| 220 | result[h] = val |
| 221 | } |
| 222 | // needed header |
| 223 | for h, val := range override { |
| 224 | result[h] = val |
| 225 | } |
| 226 | return result |
| 227 | } |
| 228 | |
| 229 | // RequestHttp deal with Header properly then send the request |
| 230 | func RequestHttp(ctx context.Context, httpMethod string, headerOverride http.Header, URL string) (*http.Response, error) { |
no test coverage detected