Struct actix_web::dev::ConnectionInfo
[−]
[src]
pub struct ConnectionInfo<'a> { /* fields omitted */ }
HttpRequest
connection information
Methods
impl<'a> ConnectionInfo<'a>
[src]
pub fn new<S>(req: &'a HttpRequest<S>) -> ConnectionInfo<'a>
[src]
Create ConnectionInfo instance for a request.
pub fn scheme(&self) -> &str
[src]
Scheme of the request.
Scheme is resolved through the following headers, in this order:
- Forwarded
- X-Forwarded-Proto
- Uri
pub fn host(&self) -> &str
[src]
Hostname of the request.
Hostname is resolved through the following headers, in this order:
- Forwarded
- X-Forwarded-Host
- Host
- Uri
- Server hostname
pub fn remote(&self) -> Option<&str>
[src]
Remote IP of client initiated HTTP request.
The IP is resolved through the following headers, in this order:
- Forwarded
- X-Forwarded-For
- peername of opened socket