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

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

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