feat(GRO-2425): split CORS_ORIGIN on commas for multiple trusted auth origins (#216)
CI / Test (push) Successful in 30s
CI / Lint & Typecheck (push) Successful in 45s
CI / Build & Push Docker Images (push) Successful in 1m10s
CI / Test (pull_request) Successful in 25s
CI / Lint & Typecheck (pull_request) Failing after 12m18s
CI / Build & Push Docker Images (pull_request) Has been skipped

feat(GRO-2425): split CORS_ORIGIN on commas for multiple trusted auth origins

Co-authored-by: Flea Flicker <flea@groombook.dev>
Co-committed-by: Flea Flicker <flea@groombook.dev>
This commit was merged in pull request #216.
This commit is contained in:
2026-06-18 00:46:29 +00:00
committed by Flea Flicker
parent 10b78d810d
commit c01e4acf0a
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -118,7 +118,8 @@ export async function initAuth(): Promise<void> {
updateAge: 60 * 60 * 24,
cookieCache: { enabled: false },
},
trustedOrigins: [process.env.CORS_ORIGIN ?? "http://localhost:5173"],
trustedOrigins: (process.env.CORS_ORIGIN ?? "http://localhost:5173")
.split(",").map((s) => s.trim()).filter(Boolean),
});
return;
}
@@ -308,7 +309,8 @@ export async function initAuth(): Promise<void> {
maxAge: 5 * 60, // 5 minutes
},
},
trustedOrigins: [process.env.CORS_ORIGIN ?? "http://localhost:5173"],
trustedOrigins: (process.env.CORS_ORIGIN ?? "http://localhost:5173")
.split(",").map((s) => s.trim()).filter(Boolean),
});
})();