altricade_portofolio/nginx.conf
Заид Омар Медхат | Zaid Omar Medhat fab8983d5c
Some checks failed
Deploy / deploy (push) Failing after 5m27s
init
2026-07-09 12:21:21 +05:00

19 lines
488 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# SPA fallback: TanStack Router handles routing client-side, so any
# unknown path must serve index.html instead of returning 404.
location / {
try_files $uri $uri/ /index.html;
}
# Long cache for hashed build assets (safe: filenames change on rebuild)
location /assets/ {
expires 30d;
add_header Cache-Control "public, immutable";
}
}