Update app.ts

This commit is contained in:
Daniel Hougaard
2025-01-13 13:59:25 +01:00
parent de91356127
commit c08fbbdab2

View File

@@ -89,7 +89,7 @@ export const main = async ({ db, hsmModule, auditLogDb, smtp, logger, queue, key
credentials: true,
...(appCfg.CORS_ALLOWED_ORIGINS?.length
? {
origin: appCfg.CORS_ALLOWED_ORIGINS
origin: [...appCfg.CORS_ALLOWED_ORIGINS, ...(appCfg.SITE_URL ? [appCfg.SITE_URL] : [])]
}
: {
origin: appCfg.SITE_URL || true