mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-13 22:51:08 -05:00
parent
897a38958c
commit
e2991eb019
2 changed files with 10 additions and 10 deletions
|
@ -149,7 +149,6 @@ func parseCaddyfile(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error)
|
|||
// from Caddyfile tokens. Syntax:
|
||||
//
|
||||
// request_header [<matcher>] [[+|-]<field> [<value|regexp>] [<replacement>]]
|
||||
//
|
||||
func parseReqHdrCaddyfile(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error) {
|
||||
if !h.Next() {
|
||||
return nil, h.ArgErr()
|
||||
|
|
|
@ -782,8 +782,9 @@ func (h *Handler) reverseProxy(rw http.ResponseWriter, req *http.Request, origRe
|
|||
copyHeader(h, http.Header(header))
|
||||
rw.WriteHeader(code)
|
||||
|
||||
// Clear headers, it's not automatically done by ResponseWriter.WriteHeader() for 1xx responses
|
||||
for k := range h {
|
||||
// Clear headers coming from the backend
|
||||
// (it's not automatically done by ResponseWriter.WriteHeader() for 1xx responses)
|
||||
for k := range header {
|
||||
delete(h, k)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue