From 62f3e0d72feddff938d4bb3b0eb1ed266a918609 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Tue, 27 Feb 2024 03:47:50 +0100 Subject: [PATCH] Cors allow anywhere in debug --- server/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main.rs b/server/src/main.rs index b3d0788..d3dbde2 100755 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -42,9 +42,9 @@ async fn main() -> std::io::Result<()> { .allowed_methods(vec!["GET", "POST"]) .max_age(3600); - // In debug mode, allow localhost + // In debug mode, allow any origin #[cfg(debug_assertions)] - let cors = cors.allowed_origin("http://localhost:8080"); + let cors = cors.allow_any_origin(); App::new() .wrap(cors)