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());