Validating Host headers in RPC requests (#1658)

* Validating Host headers in RPC requests

* Fixing convention [ci skip]

* Remove extra indent.

[ci:skip]
This commit is contained in:
Tomasz Drwięga
2016-07-19 12:53:58 +02:00
committed by Gav Wood
parent 615fca5dc5
commit 6e79a36ef6
11 changed files with 176 additions and 60 deletions

View File

@@ -129,6 +129,7 @@ impl Server {
special.insert(router::SpecialEndpoint::Utils, apps::utils());
special
});
let bind_address = format!("{}", addr);
try!(hyper::Server::http(addr))
.handle(move |_| router::Router::new(
@@ -136,6 +137,7 @@ impl Server {
endpoints.clone(),
special.clone(),
authorization.clone(),
bind_address.clone(),
))
.map(|(l, srv)| {