Skip to main content

get_request_host

Function get_request_host 

Source
pub fn get_request_host(header: &RequestHeader) -> Option<&str>
Expand description

The host of the request as it was sent, less its port: what get_host gives before it drops the root label.

The cache key is made of this one. The request goes to the upstream with the Host it came with, and an upstream that answers example.com. differently from example.com - it does not know the name, or writes it into a redirect - must not have that answer stored as the answer for the other.