fix: foreign_api handles pre-flight OPTIONS call on POST requests (#2365)

This commit is contained in:
Gavin McDermott
2019-01-14 11:53:09 -08:00
committed by Ignotus Peverell
parent c7bb5eab27
commit 34bd35e8fc
+4
View File
@@ -627,6 +627,10 @@ where
ok(create_error_response(e))
}))
}
fn options(&self, _req: Request<Body>) -> ResponseFuture {
Box::new(ok(create_ok_response("{}")))
}
}
// Utility to serialize a struct into JSON and produce a sensible Response