summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/headers
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-01-06 08:10:20 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2020-01-06 08:10:20 -0700
commit5c99267dd870936a02f942130302b76b1f15efa2 (patch)
tree17bddda28cd22facf4cc3a3d801aabeef6e4d83c /modules/caddyhttp/headers
parenta6df4cdbbca673bf3a2ff1bc2369a887c6953b93 (diff)
A few miscellaneous, minor fixes
Diffstat (limited to 'modules/caddyhttp/headers')
-rw-r--r--modules/caddyhttp/headers/caddyfile.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/caddyhttp/headers/caddyfile.go b/modules/caddyhttp/headers/caddyfile.go
index c1444d0..55ad991 100644
--- a/modules/caddyhttp/headers/caddyfile.go
+++ b/modules/caddyhttp/headers/caddyfile.go
@@ -105,6 +105,9 @@ func parseReqHdrCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler,
}
if h.NextArg() {
replacement = h.Val()
+ if h.NextArg() {
+ return nil, h.ArgErr()
+ }
}
if hdr.Request == nil {