fix: add Traefik SSE streaming support for backend

- flushInterval=100ms prevents Traefik from buffering SSE responses
- X-Accel-Buffering=no header disables proxy buffering
- Fixes SSE connection dropping during report generation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
furkanyigit34
2026-03-08 02:07:21 +03:00
parent e3bed0a999
commit a9170bda83

View File

@@ -39,6 +39,10 @@ services:
labels:
- "traefik.http.services.backend.loadbalancer.server.port=8001"
# SSE streaming support - flush immediately, don't buffer
- "traefik.http.services.backend.loadbalancer.responseForwarding.flushInterval=100ms"
# Long timeout for report generation (up to 10 minutes)
- "traefik.http.middlewares.backend-timeout.headers.customResponseHeaders.X-Accel-Buffering=no"
environment:
# Python environment