From e6402beea48a93502bcb080b90b1bef2c9864910 Mon Sep 17 00:00:00 2001 From: subodh Date: Wed, 11 Mar 2026 11:28:41 +0000 Subject: [PATCH] updated nginx --- nginx.conf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..d3078a4 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,21 @@ +server { + listen 80; + root /usr/share/nginx/html; + index index.html; + + # Handle React/Vite SPA routing + location / { + try_files $uri $uri/ /index.html; + } + + # Cache static assets + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } + + # Disable caching for index.html + location = /index.html { + add_header Cache-Control "no-cache, no-store, must-revalidate"; + } +} \ No newline at end of file