092_user_interface / nginx.conf
anhkhoiphan's picture
chore: add Dockerfile and nginx config for HF Space deployment
1a89055
raw
history blame contribute delete
573 Bytes
server {
listen 7860;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Gzip
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml image/svg+xml;
# Static assets — cache dài
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
# SPA fallback — mọi route đều trả index.html
location / {
try_files $uri $uri/ /index.html;
}
}