Merged in fix/my-stay-webview (pull request #2169)

fix: webviews - my stay

* Test
This commit is contained in:
Linus Flood
2025-05-21 06:08:16 +00:00
parent 5272af2ab1
commit 11237b211b

View File

@@ -135,7 +135,14 @@ async function handleWebviewRewrite({
const path = nextUrl.pathname
if (myStayWebviews.includes(path)) {
return NextResponse.next({ request: { headers } })
return NextResponse.next({
request: { headers },
...(setCookie && {
headers: {
"Set-Cookie": `webviewToken=${decryptedData}; Secure; HttpOnly; Path=/; SameSite=Strict;`,
},
}),
})
}
const pathNameWithoutLang = path.replace(`/${lang}/webview`, "")