From a6a4b846b34b9829b6ed6ead15f13ea00f73c03d Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 2 Nov 2026 21:37:48 +0100 Subject: api: /stream & dashboard send X-Accel-Buffering --- src/api/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/api/mod.rs') 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( -- cgit v1.3.1