caddy/modules
kylosus 45132c5b24
caddyhttp: Add plaintext response to file_server browse (#6093)
* Added plaintext support to file_server browser

This commit is twofold: First it adds a new optional
field, `return_type`, to `browser` for setting the
default format of the returned index (html, json or plaintext).
This is used when the `Accept` header is set to `/*`.

Second, it adds a preliminary `text/plain`
support to the `file_server` browser that
returns a text representation of the file
system, when an `Accept: text/plain` header
is present, with the behavior discussed above.

* Added more details and better formatting to plaintext browser

* Replaced returnType conditions with a switch statement

* Simplify

---------

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2024-04-01 18:12:40 +00:00
..
caddyevents caddyfile: Normalize & flatten all unmarshalers (#6037) 2024-01-23 19:36:59 -05:00
caddyfs filesystem: Globally declared filesystems, fs directive (#5833) 2024-01-13 20:12:43 +00:00
caddyhttp caddyhttp: Add plaintext response to file_server browse (#6093) 2024-04-01 18:12:40 +00:00
caddypki acmeserver: add policy field to define allow/deny rules (#5796) 2024-02-24 02:26:00 +03:00
caddytls modules: fix some typo in conments (#6206) 2024-03-30 02:45:42 +00:00
filestorage caddyfile: Normalize & flatten all unmarshalers (#6037) 2024-01-23 19:36:59 -05:00
logging logging: support ms duration format and add docs (#6187) 2024-03-21 22:17:09 -04:00
metrics caddyfile: Normalize & flatten all unmarshalers (#6037) 2024-01-23 19:36:59 -05:00
standard filesystem: Globally declared filesystems, fs directive (#5833) 2024-01-13 20:12:43 +00:00