diff options
author | Francis Lavoie <[email protected]> | 2022-03-04 22:50:05 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-03-04 20:50:05 -0700 |
commit | 09ba9e994e6391162fbfdfbd90c72270bdff3a49 (patch) | |
tree | 29d4d166bda14d28cbcd6b8e8c61126fcbd46a3d /modules/caddyhttp/fileserver/caddyfile.go | |
parent | be82cc7acae6c259aec176363478cdb390a989ee (diff) | |
download | caddy-09ba9e994e6391162fbfdfbd90c72270bdff3a49.tar.gz caddy-09ba9e994e6391162fbfdfbd90c72270bdff3a49.zip |
fileserver: Add `pass_thru` Caddyfile option (#4613)
Diffstat (limited to 'modules/caddyhttp/fileserver/caddyfile.go')
-rw-r--r-- | modules/caddyhttp/fileserver/caddyfile.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go index 886d6672c..264153530 100644 --- a/modules/caddyhttp/fileserver/caddyfile.go +++ b/modules/caddyhttp/fileserver/caddyfile.go @@ -120,6 +120,12 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) falseBool := false fsrv.CanonicalURIs = &falseBool + case "pass_thru": + if h.NextArg() { + return nil, h.ArgErr() + } + fsrv.PassThru = true + default: return nil, h.Errf("unknown subdirective '%s'", h.Val()) } |