summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/fileserver
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-08-27 14:38:24 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-08-27 14:38:24 -0600
commitd242f10eda8fdd52f86701cf3685090e9761489f (patch)
tree1b13f2f3e8dbc09f2a697a40b5e99f481039a13d /modules/caddyhttp/fileserver
parent2dc4fcc62bfab639b60758f26659c03e58af9960 (diff)
Add query_string to HTTP replacer and use it for try_files
Diffstat (limited to 'modules/caddyhttp/fileserver')
-rw-r--r--modules/caddyhttp/fileserver/caddyfile.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go
index 7afcc9e..6480598 100644
--- a/modules/caddyhttp/fileserver/caddyfile.go
+++ b/modules/caddyhttp/fileserver/caddyfile.go
@@ -17,9 +17,9 @@ package fileserver
import (
"encoding/json"
- "github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite"
"github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile"
"github.com/caddyserver/caddy/v2/modules/caddyhttp"
+ "github.com/caddyserver/caddy/v2/modules/caddyhttp/rewrite"
)
func init() {
@@ -99,7 +99,7 @@ func parseTryFiles(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error)
}
handler := rewrite.Rewrite{
- URI: "{http.matchers.file.relative}{http.request.uri.query}",
+ URI: "{http.matchers.file.relative}{http.request.uri.query_string}",
}
matcherSet := map[string]json.RawMessage{