Add a Caddyfile

Related: https://gitlab.com/soapbox-pub/ditto/-/issues/265
This commit is contained in:
Alex Gleason 2025-01-17 18:59:25 -06:00
parent ed29ecdb3f
commit 5b9868bc3a
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

23
installation/Caddyfile Normal file
View file

@ -0,0 +1,23 @@
example.com {
@public path /packs/* /instance/* /images/* /favicon.ico /sw.js /sw.js.map
handle /packs/* {
root * /opt/ditto/public
header Cache-Control "public, max-age=31536000, immutable"
header Strict-Transport-Security "max-age=31536000"
file_server
}
handle @public {
root * /opt/ditto/public
file_server
}
handle /metrics {
respond "Access denied" 403
}
handle {
reverse_proxy :4036
}
}