caddy/modules/caddyhttp/fileserver
Rayan Salhab a4a38c3e88
rewrite: escape file matcher paths before rewriting (#7683)
* fix: escape file matcher paths in rewrites

Preserve matched file paths containing literal '?' or '%' when try_files rewrites to http.matchers.file.relative.

* test: cover nested escaped try_files rewrite paths

* test: cover encoded slash try_files rewrite paths

* fix: assert file matcher placeholder as string

---------

Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
2026-05-11 17:16:33 -06:00
..
testdata fileserver: Fix tests on Windows 2026-02-20 11:46:45 -07:00
browse.go chore: Fix golangci-lint 2.12.1 findings (#7690) 2026-05-07 03:40:26 -04:00
browse.html fileserver: denote license for embedded JavaScript for LibreJS (#7127) 2025-07-16 11:49:49 -06:00
browsetplcontext.go fileserver: show symlink targets verbatim (#7579) 2026-04-15 04:49:30 +10:00
browsetplcontext_test.go fileserver: Use EscapedPath for browse (#5534) 2023-05-15 10:48:05 -06:00
caddyfile.go fileserver: good default for precompressed (#6736) 2024-12-10 08:31:43 -07:00
command.go fileserver: Add file_limit option for browse (to be experimental) (#6648) 2024-11-05 09:35:32 -07:00
matcher.go fileserver: Replace \ with \\ in file matcher paths 2026-02-19 13:18:14 -07:00
matcher_test.go rewrite: escape file matcher paths before rewriting (#7683) 2026-05-11 17:16:33 -06:00
staticfiles.go chore: Fix golangci-lint 2.12.1 findings (#7690) 2026-05-07 03:40:26 -04:00
staticfiles_test.go caddyhttp: Refactor and export SanitizedPathJoin for use in fastcgi (#4207) 2021-06-17 09:59:08 -06:00