From 8ff532bb6757838539cb8364240cf457b9c1232d Mon Sep 17 00:00:00 2001 From: Maulana Sodiqin Date: Thu, 20 Mar 2025 17:07:38 +0700 Subject: [PATCH] fix: cors --- src/apps/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/mod.rs b/src/apps/mod.rs index be39529..d23cb3e 100644 --- a/src/apps/mod.rs +++ b/src/apps/mod.rs @@ -13,12 +13,12 @@ pub async fn apps(surrealdb: SurrealClient, redisdb: RedisClient) -> Router { let state = AppState { surrealdb, redisdb }; let env = Env::new(); let cors_origins = match env.rust_env.as_str() { - "development" => vec!["http://localhost:5173"], + "development" => vec!["http://localhost:3000"], "production" => { vec!["https://gacha.imphnen.dev", "https://imphnen.dev"] } _ => vec![ - "http://localhost:5173", + "http://localhost:3000", "https://gacha.imphnen.dev", "https://imphnen.dev", ],