Removed cookie requirement for V2

This commit is contained in:
zomars
2022-09-15 12:09:06 +01:00
parent 859bf60ee5
commit a9b41766f2
2 changed files with 2 additions and 7 deletions
+1 -4
View File
@@ -43,11 +43,8 @@ const middleware: NextMiddleware = async (req) => {
return NextResponse.redirect(req.nextUrl);
}
}
/** Display available V2 pages to users who opted-in to early access */
/** Display available V2 pages */
if (
// ⬇ TODO: Remove this line for V2 launch
req.cookies.has("calcom-v2-early-access") &&
// ⬆ TODO: Remove this line for V2 launch
!V2_BLACKLIST.some((p) => url.pathname.startsWith(p)) &&
V2_WHITELIST.some((p) => url.pathname.startsWith(p))
) {
+1 -3
View File
@@ -156,19 +156,17 @@ const nextConfig = {
},
{
source: "/settings",
destination: "/settings/profile",
destination: "/settings/my-account/profile",
permanent: true,
},
/* V2 testers get redirected to the new settings */
{
source: "/settings/profile",
has: [{ type: "cookie", key: "calcom-v2-early-access" }],
destination: "/settings/my-account/profile",
permanent: false,
},
{
source: "/settings/security",
has: [{ type: "cookie", key: "calcom-v2-early-access" }],
destination: "/settings/security/password",
permanent: false,
},