From 09ba9e994e6391162fbfdfbd90c72270bdff3a49 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Fri, 4 Mar 2022 22:50:05 -0500 Subject: fileserver: Add `pass_thru` Caddyfile option (#4613) --- modules/caddyhttp/fileserver/caddyfile.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules') diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go index 886d667..2641535 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()) } -- cgit v1.2.3