Openstatus www.openstatus.dev

chore: proxy logs

+2
+2
apps/dashboard/src/proxy.ts
··· 22 22 } 23 23 24 24 if (!req.auth && url.pathname !== "/login") { 25 + console.log("User not authenticated, redirecting to login"); 25 26 const newURL = new URL("/login", req.url); 26 27 const encodedSearchParams = `${url.pathname}${url.search}`; 27 28 ··· 34 35 35 36 if (req.auth && url.pathname === "/login") { 36 37 const redirectTo = url.searchParams.get("redirectTo"); 38 + console.log("User authenticated, redirecting to", redirectTo); 37 39 if (redirectTo) { 38 40 const redirectToUrl = new URL(redirectTo, req.url); 39 41 return NextResponse.redirect(redirectToUrl);