Default to VERCEL_URL (#9969)

pull/9968/head^2
Alex van Andel 2023-07-06 20:01:12 +02:00 committed by GitHub
parent 01a5d588f3
commit fbb27ceab0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,9 @@ exports.teamTypeRoutePath = "/team/:slug/:type((?!book$)[^/]+)";
exports.privateLinkRoutePath = "/d/:link/:slug((?!book$)[^/]+)";
exports.embedUserTypeRoutePath = `/:user((?!${afterFilesRewriteExcludePages.join("/|")})[^/]*)/:type/embed`;
exports.embedTeamTypeRoutePath = "/team/:slug/:type/embed";
let subdomainRegExp = (exports.subdomainRegExp = getSubdomainRegExp(process.env.NEXT_PUBLIC_WEBAPP_URL));
let subdomainRegExp = (exports.subdomainRegExp = getSubdomainRegExp(
process.env.NEXT_PUBLIC_WEBAPP_URL || "https://" + process.env.VERCEL_URL
));
exports.orgHostPath = `^(?<orgSlug>${subdomainRegExp})\\..*`;
let beforeRewriteExcludePages = pages.concat(otherNonExistingRoutePrefixes);