don't route missing asset requests to index.html
This commit is contained in:
parent
51e5086e07
commit
2a054895a8
1 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue