mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
15 lines
400 B
TypeScript
15 lines
400 B
TypeScript
import { createCookieSessionStorage } from "@remix-run/node";
|
|
import invariant from "tiny-invariant";
|
|
|
|
invariant(process.env["SESSION_SECRET"]);
|
|
export const sessionStorage = createCookieSessionStorage({
|
|
cookie: {
|
|
name: "_session",
|
|
sameSite: "lax",
|
|
path: "/",
|
|
httpOnly: true,
|
|
secrets: [process.env["SESSION_SECRET"]],
|
|
secure: process.env.NODE_ENV === "production",
|
|
},
|
|
});
|