Crate iron_reverse_proxy [] [src]

Some simple BeforeMiddleware to make using Iron behind a reverse proxy easier.

use iron::prelude::*;
let mut ch = Chain::new(handler);
ch.link_before(iron_reverse_proxy::ReverseProxyMiddleware);

And you're done. Works particularly well with router's url_for! macro, as it depends on the Request.url property, which this middleware modifies.

Structs

ReverseProxyMiddleware

A BeforeMiddleware which checks common X-Forwarded-* headers and applies them to the request URL.