From 8ec90f1c402b5e1aa1eea59e45f700aeb45da6ba Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 2 Feb 2021 16:19:58 -0700 Subject: caddyhttp: Check for invalid subdirectives of static_response Ref: https://caddy.community/t/acme-server-implementation/11256/ --- modules/caddyhttp/staticresp.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/caddyhttp/staticresp.go') 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()) } } } -- cgit v1.2.3