From 38737bc725395a267306fff73aa3caedb84dce1b Mon Sep 17 00:00:00 2001 From: monsterkrampe Date: Mon, 27 Mar 2023 14:42:42 +0200 Subject: [PATCH] Relax CORS restrictions for local development --- server/src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/src/main.rs b/server/src/main.rs index d5e6a94..a99bd25 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -128,9 +128,8 @@ async fn main() -> std::io::Result<()> { #[cfg(feature = "cors_for_local_development")] let server = HttpServer::new(|| { let cors = Cors::default() - .allowed_origin("http://localhost:1234") - .allowed_origin("https://web.postman.co") - .allowed_methods(vec!["GET", "POST"]) + .allow_any_origin() + .allow_any_method() .allow_any_header() .max_age(3600);