aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/.server/session.ts
blob: 473030563a3b8af339d08a287b8ef41733a20f55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { createCookieSessionStorage } from "@remix-run/node";

export const cookieOptions = {
	sameSite: "lax" as const,
	path: "/",
	httpOnly: true,
	secure: process.env.NODE_ENV === "production",
	secrets: [process.env.ALBATROSS_COOKIE_SECRET ?? "local"],
};

export const sessionStorage = createCookieSessionStorage({
	cookie: {
		name: "albatross_session",
		...cookieOptions,
	},
});