diff options
author | Matthew Holt <[email protected]> | 2021-02-02 16:19:58 -0700 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2021-02-02 16:19:58 -0700 |
commit | 8ec90f1c402b5e1aa1eea59e45f700aeb45da6ba (patch) | |
tree | 0aa4ed2c76919d56a8b1266d10ec511627ff982b /modules | |
parent | 90284e8017fedeb6eeb9f4183660a679b8a5e15e (diff) | |
download | caddy-8ec90f1c402b5e1aa1eea59e45f700aeb45da6ba.tar.gz caddy-8ec90f1c402b5e1aa1eea59e45f700aeb45da6ba.zip |
caddyhttp: Check for invalid subdirectives of static_response
Ref: https://caddy.community/t/acme-server-implementation/11256/
Diffstat (limited to 'modules')
-rw-r--r-- | modules/caddyhttp/staticresp.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/caddyhttp/staticresp.go b/modules/caddyhttp/staticresp.go index 4b11e0e6b..c587f5ee6 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()) } } } |