Problem with streaming SSE server behind traefik


I'm currently working on a fastapi server with StreamingResponse that is sending server side events.

In nginx I the stream is working with following configuration

            proxy_http_version 1.1;
            proxy_set_header Connection '';
            proxy_buffering off;

however I am not sure how to replicate this on traefik, currently the full response is coming back once in the end.

I am running on traefik:2.8.4

Would also be helpful if someone could confirm whether proxy_buffering behaviour exists in general in traefik, that would eliminate a possibility. I wasn't able to find much on the subject.


  • Turning off buffering middleware allowed the chunked response to come back in a streamed fashion

Did you have an explicit Traefik middleware enabled?

buffering middleware was enabled to increase max request body size, and removing it allowed the response to come back in streamed chunks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.