From 4498b89ac4ff67697c3c63752ab2f38a34ae57a7 Mon Sep 17 00:00:00 2001 From: Geometrically <18202329+Geometrically@users.noreply.github.com> Date: Sat, 12 Feb 2022 19:57:00 -0700 Subject: [PATCH] Fix lax cors configuration (#295) --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8cfe97891..d9d31677f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -240,10 +240,9 @@ async fn main() -> std::io::Result<()> { App::new() .wrap( Cors::default() - .allowed_methods(["GET", "POST", "DELETE", "PATCH", "PUT"]) - .allowed_headers([http::header::AUTHORIZATION, http::header::ACCEPT]) - .allowed_header(http::header::CONTENT_TYPE) .allow_any_origin() + .allow_any_header() + .allow_any_method() .max_age(3600), ) .wrap(