From 47b0e9b1602075cfe351fa818ab22a299447d795 Mon Sep 17 00:00:00 2001 From: nfebe Date: Mon, 30 Mar 2026 20:00:20 +0200 Subject: [PATCH] fix(nginx): Remove static file extension location block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This block serves files matching static extensions directly from disk, bypassing PHP. Any Laravel API route ending in .png, .jpg, etc. never reaches the application — breaking file-serving endpoints and CORS middleware. Redundant since try_files already serves static files from disk. Signed-off-by: nfebe --- nginx.conf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/nginx.conf b/nginx.conf index 9103e21..42cd34d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -26,11 +26,6 @@ server { deny all; } - location ~* \.(css|js|gif|ico|jpeg|jpg|png|svg|woff|woff2|ttf|eot)$ { - expires 1y; - add_header Cache-Control "public, immutable"; - } - add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "1; mode=block" always;