mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-25 18:40:06 -04:00
Caddy must serve files inline on /media and download on /download.
This commit is contained in:
parent
19a0e7e1c5
commit
da8a9bb923
3 changed files with 49 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue