Struct actix_web::dev::ConnectionInfo [−][src]
HttpRequest
connection information
Methods
impl ConnectionInfo
[src]
[−]
impl ConnectionInfo
pub fn update(&mut self, req: &Request)
[src]
[−]
pub fn update(&mut self, req: &Request)
Create ConnectionInfo instance for a request.
pub fn scheme(&self) -> &str
[src]
[−]
pub fn scheme(&self) -> &str
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]
[−]
pub fn host(&self) -> &str
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]
[−]
pub fn remote(&self) -> Option<&str>
Remote IP of client initiated HTTP request.
The IP is resolved through the following headers, in this order:
- Forwarded
- X-Forwarded-For
- peer name of opened socket
Trait Implementations
impl Clone for ConnectionInfo
[src]
[+]
impl Clone for ConnectionInfo
impl Default for ConnectionInfo
[src]
[+]
impl Default for ConnectionInfo
Auto Trait Implementations
impl Send for ConnectionInfo
impl Send for ConnectionInfo
impl Sync for ConnectionInfo
impl Sync for ConnectionInfo