diff --git a/node/http-context/header.go b/node/http-context/header.go index e9b4233d..0d5b22fe 100644 --- a/node/http-context/header.go +++ b/node/http-context/header.go @@ -170,12 +170,9 @@ func (r *ResponseHeader) SetHeader(key, value string) { } func (r *ResponseHeader) AddHeader(key, value string) { - r.cache.Add(key, value) - - if r.afterProxy { - r.header.Add(key, value) - } else { + r.header.Add(key, value) + if !r.afterProxy { r.actions = append(r.actions, &headerAction{ Key: key, Value: value, @@ -185,12 +182,9 @@ func (r *ResponseHeader) AddHeader(key, value string) { } func (r *ResponseHeader) DelHeader(key string) { - r.cache.Del(key) - if r.afterProxy { - r.header.Del(key) - - } else { + r.header.Del(key) + if !r.afterProxy { r.actions = append(r.actions, &headerAction{ Key: key, Action: headerActionDel,