From da1767c26163cdb02c3f7e2f30572710e2f32aaf Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Thu, 30 Apr 2026 18:32:06 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(frontend)=20refine=20Nginx?= =?UTF-8?q?=20config=20for=20DINUM=20frontend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lint and clean up the Nginx configuration. Fix an issue affecting static asset serving. --- docker/dinum-frontend/nginx/default.conf | 30 +++++++++++++++--------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/docker/dinum-frontend/nginx/default.conf b/docker/dinum-frontend/nginx/default.conf index bbb05726..6daead5c 100644 --- a/docker/dinum-frontend/nginx/default.conf +++ b/docker/dinum-frontend/nginx/default.conf @@ -13,20 +13,28 @@ server { # Manifest — fetched, never iframed location = /addons/outlook/manifest.xml { - alias /usr/share/nginx/html/addons/outlook/manifest.xml; + alias /usr/share/nginx/html/addons/outlook/manifest.xml; - add_header Access-Control-Allow-Origin "*"; - add_header Cache-Control "no-cache, no-store, must-revalidate"; - add_header X-Frame-Options "DENY"; - add_header Content-Security-Policy "frame-ancestors 'none'"; + add_header Access-Control-Allow-Origin "*"; + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header X-Frame-Options "DENY"; + add_header Content-Security-Policy "frame-ancestors 'none'"; } - location ~* ^/addons/outlook/assets/.+\.(css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { - alias /usr/share/nginx/html/addons/outlook/assets/; - expires 30d; - add_header Cache-Control "public, max-age=2592000, immutable" always; - add_header Access-Control-Allow-Origin "*"; - add_header Vary "Origin" always; + location = /addons/outlook/assets/ { + return 404; + } + + location ~* ^/addons/outlook/assets/(.+\.(?:css|js|json|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot))/?$ { + root /usr/share/nginx/html; + expires 30d; + add_header Cache-Control "public, max-age=2592000, immutable" always; + add_header Access-Control-Allow-Origin "*"; + add_header Vary "Origin" always; + } + + location = /addons/outlook/ { + return 404; } location ~ ^/addons/outlook(/.*)?$ {