caddy/modules/caddyhttp
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
..
caddyauth go.mod: Migrate to golang.org/x/term (#4073) 2021-03-29 12:39:08 -06:00
encode encode: ignore flushing until after first write (#4318) 2021-08-31 13:36:36 -06:00
fileserver fileserver: Support virtual file systems (#4909) 2022-07-30 13:07:44 -06:00
headers headers: Only replace known placeholders (#4880) 2022-07-12 12:16:03 -06:00
map map: Prevent output destinations overlap with Caddyfile shorthands (#4657) 2022-05-06 10:25:31 -06:00
push caddyhttp: Make logging of credential headers opt-in (#4438) 2021-12-02 13:26:24 -07:00
requestbody requestbody: Return HTTP 413 (fix #4558) 2022-03-11 12:34:55 -07:00
reverseproxy Ignore linter warnings 2022-07-28 15:40:23 -06:00
rewrite rewrite: Handle fragment before query (fix #4775) 2022-05-09 11:09:42 -06:00
standard reverseproxy: Support performing pre-check requests (#4739) 2022-05-06 10:50:26 -04:00
templates core: Windows service integration (#4790) 2022-07-29 14:06:54 -06:00
tracing tracing: New OpenTelemetry module (#4361) 2022-03-08 12:18:32 -07:00
app.go caddyhttp: Log shutdown errors, don't return (fix #4908) 2022-07-25 10:39:59 -06:00
autohttps.go Fix #4822 and fix #4779 2022-06-01 15:12:57 -06:00
caddyhttp.go fileserver: do not double-escape paths (#4447) 2021-12-11 09:26:21 -05:00
caddyhttp_test.go caddyhttp: Refactor and export SanitizedPathJoin for use in fastcgi (#4207) 2021-06-17 09:59:08 -06:00
celmatcher.go Finish fixing lint errors from ea8df6ff 2022-07-28 15:16:36 -06:00
celmatcher_test.go Expose several Caddy HTTP Matchers to the CEL Matcher (#4715) 2022-06-22 18:53:46 -04:00
errors.go requestbody: Return HTTP 413 (fix #4558) 2022-03-11 12:34:55 -07:00
httpredirectlistener.go caddyhttp: Move HTTP redirect listener to an optional module (#4585) 2022-02-19 15:36:36 -07:00
marshalers.go caddyhttp: Make logging of credential headers opt-in (#4438) 2021-12-02 13:26:24 -07:00
matchers.go caddyhttp: Use new CEL APIs (fix #4915) 2022-07-28 14:50:28 -06:00
matchers_test.go caddyhttp: Sanitize the path before evaluating path matchers (#4407) 2021-11-08 13:45:03 -07:00
metrics.go move common metrics-related funcs to internal package 2022-01-25 15:07:17 -05:00
metrics_test.go move common metrics-related funcs to internal package 2022-01-25 15:07:17 -05:00
replacer.go reverseproxy: Add _ms placeholders for proxy durations (#4666) 2022-04-11 13:04:05 -06:00
replacer_test.go caddyfile: Fix caddy fmt nesting not decrementing (#4157) 2021-05-10 12:01:27 -06:00
responsematchers.go General minor improvements to docs 2021-09-24 18:31:01 -06:00
responsematchers_test.go reverseproxy: Add handle_response blocks to reverse_proxy (#3710) (#4021) 2021-05-02 12:39:06 -06:00
responsewriter.go caddyhttp: Fix trailers when recording responses (fixes #3236) 2020-04-22 11:10:13 -06:00
routes.go caddyhttp: Clear out matcher error immediately after grabbing it (#4916) 2022-07-28 15:19:48 -06:00
server.go reverseproxy: Add _ms placeholders for proxy durations (#4666) 2022-04-11 13:04:05 -06:00
staticerror.go httpcaddyfile: Add error directive for the existing handler (#4034) 2021-03-12 13:25:49 -07:00
staticresp.go caddyhttp: Check for invalid subdirectives of static_response 2021-02-02 16:19:58 -07:00
staticresp_test.go Move from deprecated ioutil to os and io packages (#4364) 2021-09-29 11:17:48 -06:00
subroute.go reverseproxy: Enable changing only the status code (close #2920) 2020-06-04 12:06:38 -06:00
vars.go caddyhttp: Clear out matcher error immediately after grabbing it (#4916) 2022-07-28 15:19:48 -06:00