From 3da30b4f6ef6d30aadeb12d815772ff8209e6f85 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 11 Oct 2023 21:31:53 -0500 Subject: [PATCH] Serve static files from nginx --- installation/ditto.conf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/installation/ditto.conf b/installation/ditto.conf index 1ea0c86..2a49173 100644 --- a/installation/ditto.conf +++ b/installation/ditto.conf @@ -44,6 +44,20 @@ server { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + location /packs { + add_header Cache-Control "public, max-age=31536000, immutable"; + add_header Strict-Transport-Security "max-age=31536000" always; + root /opt/ditto/public; + } + + location ~ ^/(instance|sw.js$|sw.js.map$) { + root /opt/ditto/public; + } + + location /images { + root /opt/ditto/static; + } + location / { proxy_pass http://ditto; }