summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2021-02-02 16:19:58 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2021-02-02 16:19:58 -0700
commit8ec90f1c402b5e1aa1eea59e45f700aeb45da6ba (patch)
tree0aa4ed2c76919d56a8b1266d10ec511627ff982b
parent90284e8017fedeb6eeb9f4183660a679b8a5e15e (diff)
caddyhttp: Check for invalid subdirectives of static_response
Ref: https://caddy.community/t/acme-server-implementation/11256/
-rw-r--r--modules/caddyhttp/staticresp.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/caddyhttp/staticresp.go b/modules/caddyhttp/staticresp.go
index 4b11e0e..c587f5e 100644
--- a/modules/caddyhttp/staticresp.go
+++ b/modules/caddyhttp/staticresp.go
@@ -99,6 +99,8 @@ func (s *StaticResponse) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
return d.Err("close already specified")
}
s.Close = true
+ default:
+ return d.Errf("unrecognized subdirective '%s'", d.Val())
}
}
}