aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/mod.rs')
-rw-r--r--src/api/mod.rs7
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(