You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using it this way now but I'd like confirmation that this is the way :)
#[event(fetch)]pubasyncfn main(req:Request,env:Env,_ctx: worker::Context) -> Result<Response>{log_request(&req);// Optionally, get more helpful error messages written to the console in the case of a panic.
utils::set_panic_hook();// CORSlet cors = Cors::default().with_max_age(86400).with_origins(vec!["*"]).with_methods(vec![Method::Get,
Method::Head,
Method::Post,
Method::Options,
]);// TRUNCATED...let router = Router::new();
router
// TRUNCATED....run(req, env).await?
.with_cors(&cors)
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Description
I'm using it this way now but I'd like confirmation that this is the way :)
The text was updated successfully, but these errors were encountered: