diff --git a/web/nginx.conf b/web/nginx.conf index 4a68823..72f934b 100644 --- a/web/nginx.conf +++ b/web/nginx.conf @@ -24,8 +24,9 @@ server { client_max_body_size 50m; } - # Cache static assets (must be before SPA fallback) - location /assets/ { + # Cache static assets (JS/CSS/images built by Vite into dist/assets/) + # Use regex to only match actual files with extensions, not bare /assets path + location ~* ^/assets/.+\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|mp4|webm)$ { expires 30d; add_header Cache-Control "public, immutable"; }