server { listen 80; server_name _; client_max_body_size 32m; root /usr/share/nginx/html; index index.html; location = /api { return 307 /api/; } location /api/ { proxy_pass http://server:8787/; proxy_http_version 1.1; proxy_buffering off; proxy_cache off; proxy_read_timeout 3600s; proxy_send_timeout 3600s; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Connection ""; } location = /sw.js { add_header Cache-Control "no-store, no-cache, must-revalidate" always; expires -1; try_files $uri =404; } location = /manifest.webmanifest { default_type application/manifest+json; add_header Cache-Control "no-store, no-cache, must-revalidate" always; expires -1; try_files $uri =404; } location = /index.html { add_header Cache-Control "no-store, no-cache, must-revalidate" always; expires -1; try_files $uri =404; } location /assets/ { add_header Cache-Control "public, max-age=31536000, immutable" always; try_files $uri =404; } location / { add_header Cache-Control "no-store, no-cache, must-revalidate" always; expires -1; try_files $uri $uri/ /index.html; } }