fix: send pathname instead of full url as redirectTo query param

This commit is contained in:
Christel Westerberg
2024-06-03 12:03:37 +02:00
parent 342e8cec18
commit 1095bcbe9d

View File

@@ -35,7 +35,7 @@ export function serverClient() {
const fullPathname = new URL(fullUrl).pathname
if (webviews.includes(fullPathname)) {
const redirectUrl = `/${lang}/webview/refresh?returnurl=${encodeURIComponent(fullUrl)}`
const redirectUrl = `/${lang}/webview/refresh?returnurl=${encodeURIComponent(fullPathname)}`
console.error(
"Unautorized in webview, redirecting to: ",
redirectUrl