-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
What is the problem your feature solves, or the need it fulfills?
This is code I have
async fn upstream_peer(
&self,
session: &mut Session,
_ctx: &mut Self::CTX,
) -> pingora::Result<Box<HttpPeer>> {
let Some(host) = session.req_header().uri.host() else {
return Err(pingora::Error::new_str("host unset"));
};
it reports host unset. Which is probably expected. But then how do I get host? I guess
session.req_header().headers.get("host")
or
session.req_header().headers.get(":authority")
or both?
Describe the solution you'd like
Add a function like
RequestHeader::host(&self) -> &str
Describe alternatives you've considered
Continue reading sources.
Additional context
0.5.0
JockeTF
Metadata
Metadata
Assignees
Labels
No labels