Struct hyper_reverse_proxy::ReverseProxy [] [src]

pub struct ReverseProxy<C: Service, B = Body> { /* fields omitted */ }

A Service that takes an incoming request, sends it to a given Client, then proxies back the response.

The implementation ensures that Hop-by-hop headers are stripped correctly in both directions, and adds the client's IP address to a comma-space-separated list of forwarding addresses in the X-Forwarded-For header.

The implementation is based on Go's httputil.ReverseProxy.

Methods

impl<C: Service, B> ReverseProxy<C, B>
[src]

Construct a reverse proxy that dispatches to the given client.

Trait Implementations

impl<C, B> Service for ReverseProxy<C, B> where
    B: 'static,
    C: Service<Request = Request<B>, Response = Response<B>>,
    C::Error: 'static + Display,
    C::Future: 'static, 
[src]

Requests handled by the service.

Responses given by the service.

Errors produced by the service.

The future response value.

Process the request and return the response asynchronously.