From 5f82b7dffe940abf896fe47dadf6c8e87ddc670b Mon Sep 17 00:00:00 2001 From: chesedo Date: Wed, 28 Sep 2022 10:10:30 +0200 Subject: [PATCH] bug: keep Host header intact --- src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ef33424..3e6a8b0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,7 +3,7 @@ #[macro_use] extern crate tracing; -use hyper::header::{HeaderMap, HeaderName, HeaderValue, HOST}; +use hyper::header::{HeaderMap, HeaderName, HeaderValue}; use hyper::http::header::{InvalidHeaderValue, ToStrError}; use hyper::http::uri::InvalidUri; use hyper::upgrade::OnUpgrade; @@ -225,10 +225,6 @@ fn create_proxied_request( debug!("Setting headers of proxied request"); - request - .headers_mut() - .insert(HOST, HeaderValue::from_str(uri.host().unwrap())?); - *request.uri_mut() = uri; remove_hop_headers(request.headers_mut());