Removed cookie requirement for V2
This commit is contained in:
@@ -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))
|
||||
) {
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user