server: add "X-Accel-Buffering": "no" header to streaming endpoints#24774
Conversation
* server: add "X-Accel-Buffering": "no" header to streaming endpoints This header tells Nginx (as a reverse proxy) to NOT buffer responses. (only affects streaming endpoints) Without it, Nginx will break streaming with certain applications (notably the Pi coding harness).
|
This is great! I haven't had buffering actually break anything yet, but it was annoying me a bit because the text comes out of the server quite chunky and harder to read versus a smooth stream. I switched computers, internet connections, and reverse proxies at the same time, so I had assumed it was the internet or computer rather than switching from Apache to Nginx, but in fact this fixes it. |
|
It costs nothing to add it. I haven't encountered this issue with Apache2/pi |
|
not 100% sure but will this be set one more time in router mode ? |
I check if it passes through! |
|
OK, on router, it works, and only one at that. Just note that it will apply to all endpoints. |
|
I mean, does the router add the same header once again? (i.e. duplicated header) |
ngxson
left a comment
There was a problem hiding this comment.
nvm, headers is a map, so it's not possible to have duplicated keys
|
I meant, no duplicates. |
Pretty sure only streaming endpoints are affected. Non-streaming endpoints like BTW as a note, Nginx will strip out the |
…gml-org#24774) * server: add "X-Accel-Buffering": "no" header to streaming endpoints This header tells Nginx (as a reverse proxy) to NOT buffer responses. (only affects streaming endpoints) Without it, Nginx will break streaming with certain applications (notably the Pi coding harness).
…gml-org#24774) * server: add "X-Accel-Buffering": "no" header to streaming endpoints This header tells Nginx (as a reverse proxy) to NOT buffer responses. (only affects streaming endpoints) Without it, Nginx will break streaming with certain applications (notably the Pi coding harness).
Overview
This header tells Nginx (as a reverse proxy with SSL) to NOT buffer responses.
Only streaming endpoints are affected. The header does nothing if Nginx is not involved.
Without it, Nginx will break streaming with certain applications (notably the Pi coding harness).
Nginx docs for reference
Requirements