fix: organizations some teams throw 404

pull/12165/head
Somay 2023-10-31 17:05:35 +05:30
parent b4d27a9326
commit d299228243
1 changed files with 4 additions and 1 deletions

View File

@ -28,7 +28,10 @@ let subdomainRegExp = (exports.subdomainRegExp = getSubdomainRegExp(
exports.orgHostPath = `^(?<orgSlug>${subdomainRegExp})\\.(?!vercel\.app).*`;
let beforeRewriteExcludePages = pages.concat(otherNonExistingRoutePrefixes);
exports.orgUserRoutePath = `/:user((?!${beforeRewriteExcludePages.join("|")}|_next|public)[a-zA-Z0-9\-_]+)`;
exports.orgUserRoutePath = `/:user((?!${beforeRewriteExcludePages
.map((page) => `\\b${page}\\b`)
.join("|")}|_next|public)[a-zA-Z0-9\-_]+)`;
exports.orgUserTypeRoutePath = `/:user((?!${beforeRewriteExcludePages.join(
"/|"
)}|_next/|public/)[^/]+)/:type((?!avatar\.png)[^/]+)`;