From 7af42334e5cbee37a230201a84c5cd9c7a7c8535 Mon Sep 17 00:00:00 2001 From: EGOIST Date: Fri, 20 May 2022 13:04:29 +0800 Subject: [PATCH] temporarily disable custom domain check --- src/pages/api/login.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/pages/api/login.ts b/src/pages/api/login.ts index 38056a40..dd17ed72 100644 --- a/src/pages/api/login.ts +++ b/src/pages/api/login.ts @@ -108,14 +108,15 @@ const handler: NextApiHandler = async (req, res) => { if (nextUrl.host !== OUR_DOMAIN && !nextUrl.host.endsWith(`.${OUR_DOMAIN}`)) { // Check if the host belong to a site - const existing = await prismaPrimary.domain.findUnique({ - where: { - domain: nextUrl.hostname, - }, - }) - if (!existing) { - throw new Error("invalid next url") - } + // const existing = await prismaPrimary.domain.findUnique({ + // where: { + // domain: nextUrl.hostname, + // }, + // }) + // if (!existing) { + // throw new Error("invalid next url") + // } + throw new Error("invalid next url") } nextUrl.searchParams.set("id", publicId)