From 2a054895a8f89f2eb6daec4f4fc810ba797c17e1 Mon Sep 17 00:00:00 2001 From: Lucas Silva Date: Fri, 13 Mar 2026 23:18:33 -0300 Subject: [PATCH] don't route missing asset requests to index.html --- nginx.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index eec65a6..ee8500d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -2,9 +2,14 @@ server { listen 4173; listen [::]:4173; + root /usr/share/nginx/html; + index index.html; + + location ~* \.(?:css|js|mjs|map|json|wasm|mp3|flac|png|jpg|jpeg|svg|webp|ico|gz|br)$ { + try_files $uri =404; + } + location / { - root /usr/share/nginx/html; - index index.html; try_files $uri $uri/ /index.html; } }