diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..ee72d86 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,17 @@ +server { + listen 80; + server_name _; + root /usr/share/nginx/html; + index index.html; + + # SPA fallback — client-side routing (react-router BrowserRouter) + location / { + try_files $uri $uri/ /index.html; + } + + # Long-cache hashed assets + location /assets/ { + expires 1y; + add_header Cache-Control "public, immutable"; + } +}