From cf5704974443cade70f44c9c8693ffb35986b7e5 Mon Sep 17 00:00:00 2001 From: InfoX Date: Sat, 3 Oct 2026 20:44:58 +0200 Subject: [PATCH] Try to fix nginx config on prod. --- docker/nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/nginx.conf b/docker/nginx.conf index 3395d20..60c44f6 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -47,6 +47,9 @@ server { location /assets/ { add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; } location ~ ^/workbox-.*\.js$ { add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; } + # The MapLibre worker is an ES module (.mjs); nginx's stock mime.types has no entry for it and module scripts need a JavaScript MIME type. + location ~ \.mjs$ { default_type text/javascript; add_header Cache-Control "no-cache"; try_files $uri =404; } + # Data files keep their names: revalidate (the service worker precaches them by content hash). location /data/ { add_header Cache-Control "no-cache"; try_files $uri =404; }