aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddyconfig/caddyfile/formatter.go
diff options
context:
space:
mode:
authorkylosus <[email protected]>2024-04-01 21:12:40 +0300
committerGitHub <[email protected]>2024-04-01 18:12:40 +0000
commit45132c5b24b411afbf90e8f897a1598d4eca790f (patch)
tree3232c948752171908ddd64bf610c8d5a1721d470 /caddyconfig/caddyfile/formatter.go
parent1217449609050471dfb70fdf35c9a22d738e2bef (diff)
downloadcaddy-45132c5b24b411afbf90e8f897a1598d4eca790f.tar.gz
caddy-45132c5b24b411afbf90e8f897a1598d4eca790f.zip
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 <[email protected]>
Diffstat (limited to 'caddyconfig/caddyfile/formatter.go')
0 files changed, 0 insertions, 0 deletions