pub struct StaticForwardProxy(pub EndpointId);Expand description
Forward proxy handler that routes all requests to a fixed endpoint.
Validates that requests use proper forward-proxy form:
- CONNECT requests must use authority-form (
host:port) - Other requests must use absolute-form (
http://host/path)
Adds X-Forwarded-For and Via headers to forwarded requests.
Tuple Fields§
§0: EndpointIdTrait Implementations§
Source§impl RequestHandler for StaticForwardProxy
impl RequestHandler for StaticForwardProxy
Source§async fn handle_request(
&self,
src_addr: SrcAddr,
req: &mut HttpRequest,
) -> Result<EndpointId, Deny>
async fn handle_request( &self, src_addr: SrcAddr, req: &mut HttpRequest, ) -> Result<EndpointId, Deny>
Determines the upstream endpoint for this request. Read more
Auto Trait Implementations§
impl Freeze for StaticForwardProxy
impl RefUnwindSafe for StaticForwardProxy
impl Send for StaticForwardProxy
impl Sync for StaticForwardProxy
impl Unpin for StaticForwardProxy
impl UnsafeUnpin for StaticForwardProxy
impl UnwindSafe for StaticForwardProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more