diff --git a/server/apps/api/src/utils/origin.ts b/server/apps/api/src/utils/origin.ts index e5d088f3c..12891c5b6 100644 --- a/server/apps/api/src/utils/origin.ts +++ b/server/apps/api/src/utils/origin.ts @@ -27,7 +27,7 @@ const TRUSTED_ORIGIN_PATTERNS = [ /^https:\/\/localhost(:\d+)?$/, /^https:\/\/127\.0\.0\.1(:\d+)?$/, // Cloudflare Workers subdomains - /^https:\/\/.*\.kwaa\.workers\.dev$/, + /^https:\/\/.*\.moeru-ai\.workers\.dev$/, ] /** diff --git a/server/apps/auth/src/origin.ts b/server/apps/auth/src/origin.ts index 36ee82f31..b060247b6 100644 --- a/server/apps/auth/src/origin.ts +++ b/server/apps/auth/src/origin.ts @@ -38,7 +38,7 @@ const TRUSTED_ORIGIN_PATTERNS = [ /^https:\/\/localhost(:\d+)?$/, /^https:\/\/127\.0\.0\.1(:\d+)?$/, // Cloudflare Workers subdomains - /^https:\/\/.*\.kwaa\.workers\.dev$/, + /^https:\/\/.*\.moeru-ai\.workers\.dev$/, ] /** diff --git a/server/apps/auth/src/tests/auth.test.ts b/server/apps/auth/src/tests/auth.test.ts index fd04303c7..4caa4e5f9 100644 --- a/server/apps/auth/src/tests/auth.test.ts +++ b/server/apps/auth/src/tests/auth.test.ts @@ -401,14 +401,14 @@ describe('ensureDynamicFirstPartyRedirectUri', () => { await ensureDynamicFirstPartyRedirectUri( db as any, - new Request('https://api.airi.build/api/auth/oauth2/authorize?client_id=airi-stage-web&redirect_uri=https%3A%2F%2Fpreview.kwaa.workers.dev%2Fauth%2Fcallback'), + new Request('https://api.airi.build/api/auth/oauth2/authorize?client_id=airi-stage-web&redirect_uri=https%3A%2F%2Fpreview.moeru-ai.workers.dev%2Fauth%2Fcallback'), [], ) expect(setCalls).toHaveLength(1) expect(setCalls[0].redirectUris).toEqual([ 'https://airi.moeru.ai/auth/callback', - 'https://preview.kwaa.workers.dev/auth/callback', + 'https://preview.moeru-ai.workers.dev/auth/callback', ]) expect(updateWhere).toHaveBeenCalledTimes(1) })