From 5b9868bc3a0ff0b0071db18f34bcef5c9d12bda7 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 17 Jan 2025 18:59:25 -0600 Subject: [PATCH] Add a Caddyfile Related: https://gitlab.com/soapbox-pub/ditto/-/issues/265 --- installation/Caddyfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 installation/Caddyfile diff --git a/installation/Caddyfile b/installation/Caddyfile new file mode 100644 index 00000000..3a91c501 --- /dev/null +++ b/installation/Caddyfile @@ -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 + } +} \ No newline at end of file