Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🔍️ Only set callback url if not root (#1521)
Luke Vellac7e4fcb4ec45
diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.tsindex 9965cd362..8176d6f2a 100644--- a/apps/web/src/middleware.ts+++ b/apps/web/src/middleware.ts@@ -39,7 +39,9 @@ export const middleware = withAuth(!isLoggedIn &&!publicRoutes.some((route) => newUrl.pathname.startsWith(route))) {- newUrl.searchParams.set("callbackUrl", newUrl.pathname);+ if (newUrl.pathname !== "/") {+ newUrl.searchParams.set("callbackUrl", newUrl.pathname);+ }newUrl.pathname = "/login";return NextResponse.redirect(newUrl);}