From 724c72867835f9287b3df3ee5a0d75327c0780cf Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 17 Dec 2019 16:30:26 -0700 Subject: rewrite: Attempt query string fix (#2891) --- modules/caddyhttp/fileserver/caddyfile.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/caddyhttp/fileserver/caddyfile.go') diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go index 8013fa2..3bd0ae4 100644 --- a/modules/caddyhttp/fileserver/caddyfile.go +++ b/modules/caddyhttp/fileserver/caddyfile.go @@ -127,7 +127,8 @@ func parseTryFiles(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error) // to the end of the query string. makeRoute := func(try []string, writeURIAppend string) []httpcaddyfile.ConfigValue { handler := rewrite.Rewrite{ - URI: "{http.matchers.file.relative}{http.request.uri.query_string}" + writeURIAppend, + Rehandle: true, + URI: "{http.matchers.file.relative}{http.request.uri.query_string}" + writeURIAppend, } matcherSet := caddy.ModuleMap{ "file": h.JSON(MatchFile{ -- cgit v1.2.3