server { listen 80; root /usr/share/nginx/html; index index.html; location /api/ { proxy_pass http://server:3000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /mcp/ { proxy_pass http://mcp:3001; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_set_header Connection ''; proxy_buffering off; proxy_cache off; } location /docs/ { proxy_pass http://docs:80/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # Hashed build artifacts are safe to cache forever location /assets/ { add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; } location / { # index.html must always revalidate, or browsers keep a stale # bundle reference after each deploy (heuristic caching) add_header Cache-Control "no-cache"; try_files $uri $uri/ /index.html; } }