caddy/modules/caddyhttp/fileserver
PerryLink a97bc460cf
fileserver: hide the config directory when it is relative (#8398)
FileServer.Provision hides the data directory when it is relative (#8327),
because a relative data directory sits under the working directory and
holds private keys. The config directory falls back to the same relative
"./caddy" when no config home can be resolved, and it holds autosave.json,
which is the loaded configuration.

The two directories are resolved independently, so an absolute data
directory did not cover a relative config directory: with XDG_DATA_HOME set
and no HOME or XDG_CONFIG_HOME, the data directory is absolute while the
config directory is "./caddy" under the served root.

Both directories are now hidden through the existing fallback, each entry
added only once.

Refs #8381
2026-11-10 14:56:52 +00:00
..
testdata caddyhttp: omit Last-Modified for unusable mod times (#7740) 2026-05-20 16:19:11 +10:00
browse.go fileserver: configure plain browse time format (#8084) 2026-11-04 17:05:11 +10:00
browse.html browse: Update Caddy logo 2026-06-20 13:45:10 -06:00
browse_test.go fileserver: configure plain browse time format (#8084) 2026-11-04 17:05:11 +10:00
browsetplcontext.go fileserver: return an empty listing for offsets past the end (#8213) 2026-10-14 01:36:53 +10:00
browsetplcontext_bench_test.go fileserver: speed up directory browsing for large directories (#7903) 2026-08-01 00:38:04 +10:00
browsetplcontext_test.go fileserver: return an empty listing for offsets past the end (#8213) 2026-10-14 01:36:53 +10:00
caddyfile.go fileserver: configure plain browse time format (#8084) 2026-11-04 17:05:11 +10: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: preserve root directory matching in try_files (#8391) 2026-11-10 03:54:23 -05:00
matcher_test.go fileserver: preserve root directory matching in try_files (#8391) 2026-11-10 03:54:23 -05:00
staticfiles.go fileserver: hide the config directory when it is relative (#8398) 2026-11-10 14:56:52 +00:00
staticfiles_hide_test.go fileserver: hide the config directory when it is relative (#8398) 2026-11-10 14:56:52 +00:00
staticfiles_test.go fileserver: ignore case for literal hide entries (#8378) 2026-11-08 21:52:49 +00:00
staticfiles_windows_test.go fileserver: reject short names in every path component (#7952) 2026-08-28 09:09:23 +00:00