pub struct StaticReverseProxy(pub EndpointAuthority);Expand description
Reverse proxy handler that routes all requests to a fixed backend.
Validates that requests use origin-form (/path) and rejects:
- CONNECT requests (not supported in reverse proxy mode)
- Absolute-form requests in HTTP/1.x (forward proxy requests)
Transforms requests to absolute-form for forwarding to the upstream proxy,
and adds X-Forwarded-For and Via headers.
Tuple Fields§
§0: EndpointAuthorityTrait Implementations§
Source§impl RequestHandler for StaticReverseProxy
impl RequestHandler for StaticReverseProxy
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 StaticReverseProxy
impl RefUnwindSafe for StaticReverseProxy
impl Send for StaticReverseProxy
impl Sync for StaticReverseProxy
impl Unpin for StaticReverseProxy
impl UnsafeUnpin for StaticReverseProxy
impl UnwindSafe for StaticReverseProxy
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