From 126b4dc1b26888571c237a65a4db051945f712a4 Mon Sep 17 00:00:00 2001 From: Reece Date: Thu, 25 Sep 2025 15:38:04 +0100 Subject: [PATCH] Nginx again --- docker/frontend/nginx.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/frontend/nginx.conf b/docker/frontend/nginx.conf index 82ba1f415..c5832eb5c 100644 --- a/docker/frontend/nginx.conf +++ b/docker/frontend/nginx.conf @@ -6,6 +6,11 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; + # Add .mjs MIME type mapping + types { + text/javascript mjs; + } + # Gzip compression gzip on; gzip_vary on; @@ -92,7 +97,8 @@ http { # Serve .mjs files with correct MIME type (must come before general static assets) location ~* \.mjs$ { - add_header Content-Type text/javascript; + try_files $uri =404; + add_header Content-Type "text/javascript; charset=utf-8" always; expires 1y; add_header Cache-Control "public, immutable"; }