fixes trail sorting && secure cookie

This commit is contained in:
Christian Beutel
2024-06-16 00:27:32 +02:00
parent 7a6cb6c771
commit aecb21aab3
6 changed files with 44 additions and 6 deletions

View File

@@ -65,7 +65,7 @@ export const handle: Handle = async ({ event, resolve }) => {
// send back the default 'pb_auth' cookie to the client with the latest store state
response.headers.set(
'set-cookie',
pb.authStore.exportToCookie({ httpOnly: false, secure: true })
pb.authStore.exportToCookie({ httpOnly: false, secure: event.url.protocol === "https:" })
)
return response