mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-06-16 05:50:15 -04:00
10 lines
374 B
TypeScript
10 lines
374 B
TypeScript
export function getTokenCookieOptions(): Parameters<typeof useCookie>[1] {
|
|
const isSecureConnection = useNuxtApp().$appInfo.production && window?.location?.protocol === "https:";
|
|
return {
|
|
maxAge: useNuxtApp().$appInfo.tokenTime * 60 * 60,
|
|
secure: isSecureConnection,
|
|
sameSite: isSecureConnection ? "none" : "lax",
|
|
partitioned: isSecureConnection,
|
|
};
|
|
}
|