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

@@ -5,5 +5,5 @@ import { currentUser } from '$lib/stores/user_store';
pb.authStore.loadFromCookie(document.cookie)
pb.authStore.onChange(() => {
currentUser.set(pb.authStore.model as User)
document.cookie = pb.authStore.exportToCookie({ httpOnly: false })
document.cookie = pb.authStore.exportToCookie({ httpOnly: false, secure: location.protocol === "https:" })
}, true)