aboutsummaryrefslogtreecommitdiff
path: root/src/modules/proxy.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-03-17 21:35:25 +0100
committermetamuffin <metamuffin@disroot.org>2025-03-17 21:35:25 +0100
commitc19e992b557c169ee0fa765c29c8ee3b4e897946 (patch)
treed191876aa109e17578dcbca647e6a14b5043141f /src/modules/proxy.rs
parent73768c25588779bce122c0e3daa023024e972298 (diff)
downloadgnix-c19e992b557c169ee0fa765c29c8ee3b4e897946.tar
gnix-c19e992b557c169ee0fa765c29c8ee3b4e897946.tar.bz2
gnix-c19e992b557c169ee0fa765c29c8ee3b4e897946.tar.zst
fix proxy module for h3. h3 still half-broken though
Diffstat (limited to 'src/modules/proxy.rs')
-rw-r--r--src/modules/proxy.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/proxy.rs b/src/modules/proxy.rs
index 2fa3538..a0e8d85 100644
--- a/src/modules/proxy.rs
+++ b/src/modules/proxy.rs
@@ -1,6 +1,7 @@
use super::{Node, NodeContext, NodeKind, NodeRequest, NodeResponse};
use crate::ServiceError;
use futures::Future;
+use http::Version;
use http_body_util::BodyExt;
use hyper::{http::HeaderValue, upgrade::OnUpgrade, StatusCode};
use hyper_util::rt::TokioIo;
@@ -41,6 +42,7 @@ impl Node for Proxy {
mut request: NodeRequest,
) -> Pin<Box<dyn Future<Output = Result<NodeResponse, ServiceError>> + Send + Sync + 'a>> {
Box::pin(async move {
+ *request.version_mut() = Version::HTTP_11; // totally not a lie
if self.set_real_ip {
request.headers_mut().insert(
"x-real-ip",