diff options
| author | tv <tv@krebsco.de> | 2026-11-02 21:37:48 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-02 21:37:48 +0100 |
| commit | a6a4b846b34b9829b6ed6ead15f13ea00f73c03d (patch) | |
| tree | 4cc54dc7eb61b638b024bddc29aa0281d05f2167 /src/api/mod.rs | |
| parent | f2b90bbcdb5347bfb68ee0e3343358e2a8e466dc (diff) | |
api: /stream & dashboard send X-Accel-Buffering
Diffstat (limited to 'src/api/mod.rs')
| -rw-r--r-- | src/api/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs index 9bb2bed..9bda84a 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -110,6 +110,13 @@ pub(crate) fn relay_only_router( .with_state(relay) } +/// On a response that streams: a reverse proxy passes it on as it comes, not once it +/// has buffered enough (nginx's `X-Accel-Buffering`). +pub(crate) const UNBUFFERED: (axum::http::HeaderName, &str) = ( + axum::http::HeaderName::from_static("x-accel-buffering"), + "no", +); + /// An error answer: `{"error": message}` with `details`' fields added (`docs/openapi.yaml`, /// `Error`). pub(crate) fn error_response( |
