Update secure cookie setting to conditionally use HTTPS protocol in authentication flows

This commit is contained in:
Sean Morley
2024-12-29 12:38:54 -05:00
parent 8716efb613
commit b5ac66a1cc
3 changed files with 3 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ export const authHook: Handle = async ({ event, resolve }) => {
path: '/',
httpOnly: true,
sameSite: 'lax',
secure: true,
secure: event.url.protocol === 'https:',
expires: expiryDate
});
}