#uri().host() works on https but not on http
1 messages · Page 1 of 1 (latest)
let host = headers.get("Host").unwrap().to_str().unwrap();
seems to work
but not on http 2 requests
http2 doesn't use Host headers
1 messages · Page 1 of 1 (latest)
Hey im using _req.uri().host().unwrap_or("localhost").to_owned() to get the hostname the user is trying to connect to, however on http it always returns localhost, while on https it works without any issues.
let host = headers.get("Host").unwrap().to_str().unwrap();
seems to work
but not on http 2 requests
http2 doesn't use Host headers