diff --git a/pages/dev/security/+guard.ts b/pages/dev/security/+guard.ts index 967f623b..f0e06e76 100644 --- a/pages/dev/security/+guard.ts +++ b/pages/dev/security/+guard.ts @@ -13,7 +13,7 @@ export const guard: GuardAsync = async ( // Render the login page while preserving the URL. (This is novel technique // which we explain down below.) throw redirect( - `${ingestPrefix}/security/login?return_url=${pageContext.url}` + `${ingestPrefix}/security/login?return_url=${pageContext.urlOriginal}` ); /* The more traditional way, redirect the user: throw redirect('/login') diff --git a/server/vike-handler.ts b/server/vike-handler.ts index 73bec817..7e0dc4ad 100644 --- a/server/vike-handler.ts +++ b/server/vike-handler.ts @@ -18,6 +18,9 @@ export async function vikeHandler< user, macrostratLogoFlavor: macrostratLogoFlavor(), }; + + console.log(pageContextInit); + const pageContext = await renderPage(pageContextInit); const response = pageContext.httpResponse;