nginx.conf 520 B

12345678910111213141516171819202122
  1. server {
  2. listen 3000;
  3. server_name localhost;
  4. root /usr/share/nginx/html;
  5. index index.html;
  6. # Handle React Router
  7. location / {
  8. try_files $uri $uri/ /index.html;
  9. }
  10. # Cache static assets
  11. location /static/ {
  12. expires 1y;
  13. add_header Cache-Control "public, immutable";
  14. }
  15. # Security headers
  16. add_header X-Frame-Options "SAMEORIGIN" always;
  17. add_header X-Content-Type-Options "nosniff" always;
  18. add_header X-XSS-Protection "1; mode=block" always;
  19. }