map $http_upgrade $connection_upgrade { default upgrade; '' close; } upstream luckystack_backend { server {{DOCKER_BACKEND_TARGET}}; keepalive 32; } server { listen 8080; server_name _; root /usr/share/nginx/html; index index.html; client_max_body_size 100m; # Add consumer-owned custom HTTP prefixes here when services.config.ts # customRoutes contains paths outside this framework-owned route set. location ~ ^/(api|sync|auth|uploads|hooks|csrf-token|_health|livez|readyz|_docs|socket\.io)(/|$) { proxy_pass http://luckystack_backend; proxy_http_version 1.1; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_read_timeout 3600s; proxy_send_timeout 3600s; proxy_buffering off; proxy_request_buffering off; } location /assets/ { try_files $uri =404; expires 1y; add_header Cache-Control "public, immutable"; } location / { try_files $uri $uri/ /index.html; add_header Cache-Control "no-store"; } }