25 lines
359 B
Caddyfile
25 lines
359 B
Caddyfile
http:// {
|
|
root * /var/lib/caddy/
|
|
|
|
@notmedia {
|
|
not path /media/*
|
|
}
|
|
|
|
@media {
|
|
path /media/*
|
|
}
|
|
|
|
header @media {
|
|
Cache-Control "public, max-age=604800, immutable"
|
|
Access-Control-Allow-Origin *
|
|
}
|
|
|
|
encode @notmedia zstd gzip
|
|
file_server
|
|
|
|
try_files {path} {path}.html {path}/index.html
|
|
|
|
handle {
|
|
respond 404
|
|
}
|
|
} |