fix: cors

This commit is contained in:
Maulana Sodiqin
2025-03-20 17:07:38 +07:00
parent eb6cfd51ae
commit 8ff532bb67
+2 -2
View File
@@ -13,12 +13,12 @@ pub async fn apps(surrealdb: SurrealClient, redisdb: RedisClient) -> Router {
let state = AppState { surrealdb, redisdb }; let state = AppState { surrealdb, redisdb };
let env = Env::new(); let env = Env::new();
let cors_origins = match env.rust_env.as_str() { let cors_origins = match env.rust_env.as_str() {
"development" => vec!["http://localhost:5173"], "development" => vec!["http://localhost:3000"],
"production" => { "production" => {
vec!["https://gacha.imphnen.dev", "https://imphnen.dev"] vec!["https://gacha.imphnen.dev", "https://imphnen.dev"]
} }
_ => vec![ _ => vec![
"http://localhost:5173", "http://localhost:3000",
"https://gacha.imphnen.dev", "https://gacha.imphnen.dev",
"https://imphnen.dev", "https://imphnen.dev",
], ],