diff --git a/ipfs/src/lib.rs b/ipfs/src/lib.rs index eeac2431b..104c7db19 100644 --- a/ipfs/src/lib.rs +++ b/ipfs/src/lib.rs @@ -77,11 +77,11 @@ impl IpfsHandler { /// Implement Hyper's HTTP handler impl Handler for IpfsHandler { fn on_request(&mut self, req: Request) -> Next { - if *req.method() != Method::Get { - return Next::write(); + match *req.method() { + Method::Get | Method::Post => {}, + _ => return Next::write() } - if !http::is_host_allowed(&req, &self.allowed_hosts) { self.out = Out::Bad("Disallowed Host header");