summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/fileserver
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/fileserver')
-rw-r--r--modules/caddyhttp/fileserver/caddyfile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/fileserver/caddyfile.go b/modules/caddyhttp/fileserver/caddyfile.go
index 2980436..9b458b2 100644
--- a/modules/caddyhttp/fileserver/caddyfile.go
+++ b/modules/caddyhttp/fileserver/caddyfile.go
@@ -146,7 +146,7 @@ func parseTryFiles(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error)
// if there are query strings in the list, we have to split into
// a separate route for each item with a query string, because
// the rewrite is different for that item
- var try []string
+ try := make([]string, 0, len(tryFiles))
for _, item := range tryFiles {
if idx := strings.Index(item, "?"); idx >= 0 {
if len(try) > 0 {