bug: keep Host header intact
This commit is contained in:
parent
e73a76600c
commit
5f82b7dffe
@ -3,7 +3,7 @@
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate tracing;
|
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::header::{InvalidHeaderValue, ToStrError};
|
||||||
use hyper::http::uri::InvalidUri;
|
use hyper::http::uri::InvalidUri;
|
||||||
use hyper::upgrade::OnUpgrade;
|
use hyper::upgrade::OnUpgrade;
|
||||||
@ -225,10 +225,6 @@ fn create_proxied_request<B>(
|
|||||||
|
|
||||||
debug!("Setting headers of proxied request");
|
debug!("Setting headers of proxied request");
|
||||||
|
|
||||||
request
|
|
||||||
.headers_mut()
|
|
||||||
.insert(HOST, HeaderValue::from_str(uri.host().unwrap())?);
|
|
||||||
|
|
||||||
*request.uri_mut() = uri;
|
*request.uri_mut() = uri;
|
||||||
|
|
||||||
remove_hop_headers(request.headers_mut());
|
remove_hop_headers(request.headers_mut());
|
||||||
|
Loading…
Reference in New Issue
Block a user