From d04682736bc0580c2f0bf7f98e0a9f0173d7e6a5 Mon Sep 17 00:00:00 2001 From: saturneric Date: Sat, 5 Jul 2025 19:49:46 +0200 Subject: refactor(nginx): simplify location block and remove caching configuration * Removed caching configuration for static files. * Updated `try_files` directive to return a 404 error instead of redirecting to `index.html`. --- nginx.conf | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/nginx.conf b/nginx.conf index 4b8416e..3217e80 100644 --- a/nginx.conf +++ b/nginx.conf @@ -6,14 +6,8 @@ server { root /usr/share/nginx/html; index index.html index.htm; - location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg|otf|webp)$ { - expires 30d; - access_log off; - add_header Cache-Control "public"; - } - location / { - try_files $uri $uri/ /index.html; + try_files $uri $uri/ =404; } error_page 404 /404.html; -- cgit v1.2.3