Fix for query string not being passed.

This commit is contained in:
Kavin 2022-11-02 20:13:27 +00:00
parent 3ab1529ba7
commit 44d1a0a053
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -107,9 +107,12 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
return Err("Domain not allowed".into());
}
let mut url = Url::parse(&*format!("https://{}{}", host, req.path()))?;
url.set_query(Some(req.query_string()));
let mut request = Request::new(
req.method().clone(),
format!("https://{}{}", host, req.path()).parse().unwrap(),
url,
);
let request_headers = request.headers_mut();