Fix nginx config to serve static assets correctly
Add /assets/ location block to serve JS/CSS with correct MIME types instead of falling back to index.html.
This commit is contained in:
parent
f6b9299d00
commit
6bdc23b9d3
1 changed files with 6 additions and 0 deletions
|
|
@ -30,6 +30,12 @@ server {
|
|||
add_header Content-Disposition "attachment; filename=visitorkiosk.apk";
|
||||
}
|
||||
|
||||
# Static assets (JS, CSS, images, fonts)
|
||||
location /assets/ {
|
||||
try_files $uri =404;
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
}
|
||||
|
||||
# Frontend SPA routing
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue