#[tokio::main]
async fn main() {
let cors = warp::cors()
.allow_any_origin()
.allow_header("not-in-the-request")
.allow_methods(
&[Method::PUT, Method::DELETE, Method::GET, Method::POST]
);
...
let get_items = warp::get()
.and(warp::path("questions"))
.and(warp::path::end())
.and_then(get_questions);
let routes = get_items.with(cors).recover(return_error);
}