34 lines
788 B
Caddyfile
34 lines
788 B
Caddyfile
photos.luciochen.com {
|
|
root * /var/lib/luphoto/site/current
|
|
|
|
@hotlink {
|
|
path /t/*
|
|
header Referer *
|
|
not header_regexp Referer ^https?://photos\.luciochen\.com(:[0-9]+)?(/|$)
|
|
}
|
|
respond @hotlink 403
|
|
|
|
@hidden path */.* *.gz
|
|
respond @hidden 404
|
|
|
|
@immutable path /t/* /og/* /assets/*
|
|
header @immutable Cache-Control "public, max-age=31536000, immutable"
|
|
|
|
@short not path /t/* /og/* /assets/*
|
|
header @short Cache-Control "public, max-age=60"
|
|
|
|
header {
|
|
Content-Security-Policy "default-src 'self'; img-src 'self' blob: data:; font-src 'self'; worker-src 'self'; frame-ancestors 'none'"
|
|
X-Content-Type-Options nosniff
|
|
Referrer-Policy strict-origin-when-cross-origin
|
|
-Server
|
|
}
|
|
|
|
@methods not method GET HEAD
|
|
respond @methods 405
|
|
|
|
file_server {
|
|
precompressed gzip
|
|
}
|
|
}
|