temporarily disable custom domain check

This commit is contained in:
EGOIST 2022-05-20 13:04:29 +08:00
parent a1dcf77e6e
commit 7af42334e5
1 changed files with 9 additions and 8 deletions

View File

@ -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)