Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

chore: revert redirects

Marc Seitzc957ee2841c6
diff --git a/lib/middleware/app.ts b/lib/middleware/app.ts
index f623394f..944f9fee 100644
--- a/lib/middleware/app.ts
+++ b/lib/middleware/app.ts
@@ -35,9 +35,9 @@ export default async function AppMiddleware(req: NextRequest) {
return NextResponse.redirect(new URL("/welcome", req.url));
}
- // AUTHENTICATED if the path is /login, redirect to "/dashboard"
+ // AUTHENTICATED if the path is /login, redirect to "/documents"
if (token?.email && path === "/login") {
- const nextPath = url.searchParams.get("next") || "/dashboard"; // Default redirection to "/dashboard" if no next parameter
+ const nextPath = url.searchParams.get("next") || "/documents"; // Default redirection to "/documents" if no next parameter
return NextResponse.redirect(
new URL(decodeURIComponent(nextPath), req.url),
);
diff --git a/next.config.mjs b/next.config.mjs
index b5b2a1c8..a33c2ab3 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -17,7 +17,7 @@ const nextConfig = {
return [
{
source: "/",
- destination: "/dashboard",
+ destination: "/documents",
permanent: false,
},
{