pub fn enable_options_preflight<'mw>(_req: &mut Request, mut res: Response<'mw>) -> MiddlewareResult<'mw> {
// Set HTTP 200.
// ContentType should be text/plain.
res.set(Ok)
.set(ContentType::plaintext());
// Just "ok" as response text.
res.send("Ok")
}
srv.options("**/*", middlewares::enable_options_preflight);
nickel
is on our benchmarking project