caddy/modules/caddyhttp/fileserver
Matt Holt 6668271661
fileserver: Support virtual file systems (#4909)
* fileserver: Support virtual file systems (close #3720)

This change replaces the hard-coded use of os.Open() and os.Stat() with
the use of the new (Go 1.16) io/fs APIs, enabling virtual file systems.
It introduces a new module namespace, caddy.fs, for such file systems.

Also improve documentation for the file server. I realized it was one of
the first modules written for Caddy 2, and the docs hadn't really been
updated since!

* Virtualize FS for file matcher; minor tweaks

* Fix tests and rename dirFS -> osFS

(Since we do not use a root directory, it is dynamic.)
2022-07-30 13:07:44 -06:00
..
testdata fileserver: properly handle escaped/non-ascii paths (#4332) 2021-09-16 20:40:31 +00:00
browse.go fileserver: Support virtual file systems (#4909) 2022-07-30 13:07:44 -06:00
browse.html fileserver: Move default browse template into a separate file (#4417) 2021-11-15 11:53:54 -07:00
browsetplcontext.go fileserver: Support virtual file systems (#4909) 2022-07-30 13:07:44 -06:00
browsetplcontext_test.go fileserver: browse: do not encode the paths in breadcrumbs and page title (#4410) 2021-11-23 03:13:09 -05:00
caddyfile.go fileserver: Add pass_thru Caddyfile option (#4613) 2022-03-04 20:50:05 -07:00
command.go httpcaddyfile: Deprecate paths in site addresses; use zap logs (#4728) 2022-04-25 10:12:10 -06:00
matcher.go fileserver: Support virtual file systems (#4909) 2022-07-30 13:07:44 -06:00
matcher_test.go fileserver: Support virtual file systems (#4909) 2022-07-30 13:07:44 -06:00
staticfiles.go fileserver: Support virtual file systems (#4909) 2022-07-30 13:07:44 -06:00
staticfiles_test.go caddyhttp: Refactor and export SanitizedPathJoin for use in fastcgi (#4207) 2021-06-17 09:59:08 -06:00