Configure reverse proxy to support streaming response (#2201)
Co-authored-by: acx10 <acx10@users.noreply.github.com>
This commit is contained in:
+11
@@ -42,6 +42,17 @@ http {
|
|||||||
proxy_pass http://localhost:8080;
|
proxy_pass http://localhost:8080;
|
||||||
proxy_set_header X-Forwarded-Port $server_port;
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
|
||||||
|
# Disable buffering for streaming responses
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_cache off;
|
||||||
|
proxy_set_header Connection '';
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
chunked_transfer_encoding on;
|
||||||
|
|
||||||
|
# Set timeouts for long-running connections
|
||||||
|
proxy_read_timeout 86400s;
|
||||||
|
proxy_send_timeout 86400s;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Proxy WebSocket requests (ws://) to the backend
|
# Proxy WebSocket requests (ws://) to the backend
|
||||||
|
|||||||
Reference in New Issue
Block a user