From 5c7ad089d223b280567ed21e9e36ddcb92149255 Mon Sep 17 00:00:00 2001 From: fawney19 Date: Fri, 19 Dec 2025 11:26:15 +0800 Subject: [PATCH] fix: disable nginx buffering for streaming responses - Add X-Accel-Buffering: no header to prevent nginx from buffering streamed content - Ensures immediate delivery of each chunk without proxy buffering delays - Improves real-time streaming performance and responsiveness - Applies to both production and local Dockerfiles --- Dockerfile.base | 1 + Dockerfile.base.local | 1 + 2 files changed, 2 insertions(+) diff --git a/Dockerfile.base b/Dockerfile.base index 948bedc..f4a695a 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -71,6 +71,7 @@ RUN printf '%s\n' \ ' proxy_request_buffering off;' \ ' chunked_transfer_encoding on;' \ ' gzip off;' \ +' add_header X-Accel-Buffering no;' \ ' proxy_connect_timeout 600s;' \ ' proxy_send_timeout 600s;' \ ' proxy_read_timeout 600s;' \ diff --git a/Dockerfile.base.local b/Dockerfile.base.local index a512f9f..e1734fb 100644 --- a/Dockerfile.base.local +++ b/Dockerfile.base.local @@ -75,6 +75,7 @@ RUN printf '%s\n' \ ' proxy_request_buffering off;' \ ' chunked_transfer_encoding on;' \ ' gzip off;' \ +' add_header X-Accel-Buffering no;' \ ' proxy_connect_timeout 600s;' \ ' proxy_send_timeout 600s;' \ ' proxy_read_timeout 600s;' \