aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/headers/headers.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/headers/headers.go')
-rw-r--r--modules/caddyhttp/headers/headers.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/caddyhttp/headers/headers.go b/modules/caddyhttp/headers/headers.go
index a3279d913..c66bd4144 100644
--- a/modules/caddyhttp/headers/headers.go
+++ b/modules/caddyhttp/headers/headers.go
@@ -200,9 +200,7 @@ func (ops HeaderOps) ApplyTo(hdr http.Header, repl *caddy.Replacer) {
for _, fieldName := range ops.Delete {
fieldName = repl.ReplaceKnown(fieldName, "")
if fieldName == "*" {
- for existingField := range hdr {
- delete(hdr, existingField)
- }
+ clear(hdr)
}
}