fix: gửi vị trí khẩn cấp trong Dashboard

This commit is contained in:
2026-06-23 12:44:38 +07:00
parent 6b15e7ff02
commit 5145835c8a
6 changed files with 250 additions and 69 deletions
+20
View File
@@ -3,10 +3,30 @@ server {
server_name yotrip.labz.io.vn localhost;
client_max_body_size 50M;
# JavaScript and CSS files - immutable caching
location ~* \.(?:js|css)$ {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public, immutable";
add_header Vary "Accept-Encoding" always;
access_log off;
}
# Images and fonts - long caching
location ~* \.(?:jpg|jpeg|png|gif|ico|svg|woff|woff2|ttf|eot)$ {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public, max-age=31536000";
access_log off;
}
# Main app route - SPA fallback (only for HTML)
location / {
root /usr/share/nginx/html;
index index.html index.htm;
# Only redirect actual routes to index.html, not assets
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# Proxy API requests to backend