# Calculate comment=# # Common parameters for reverse proxying. # Include inside a server or location block via: include snippets/proxy.conf; proxy_http_version 1.1; 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_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; # Disable buffering (important for SSE / WebSocket) proxy_buffering off; # If the backend returns large responses proxy_buffers 8 16k; proxy_buffer_size 32k; # Timeouts — adjust based on workload proxy_connect_timeout 10s; proxy_send_timeout 60s; proxy_read_timeout 60s; # WebSocket support proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade;