Caddy must serve files inline on /media and download on /download.

This commit is contained in:
Roland 2026-03-08 09:54:00 -06:00
parent 19a0e7e1c5
commit da8a9bb923
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
3 changed files with 49 additions and 0 deletions

View file

@ -67,9 +67,20 @@
redir * /docs/ 301
}
# Custom MIME types not in Caddy's defaults.
@yaml path *.yaml *.yml
header @yaml Content-Type "text/yaml"
@epub path *.epub
header @epub Content-Type "application/epub+zip"
@mobi path *.mobi
header @mobi Content-Type "application/x-mobipocket-ebook"
# Static media files with directory browsing.
handle_path /media/* {
root * /media/wrolpi
header Content-Disposition "inline"
file_server browse
}
handle /media {