don't route missing asset requests to index.html

This commit is contained in:
Lucas Silva 2026-03-13 23:18:33 -03:00
parent 51e5086e07
commit 2a054895a8

View file

@ -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;
}
}