interface SessionCookieOptions
Since 0.2.0

Cookie attributes for the session cookie.

Defaults are the secure ones (AI_GUIDELINES ยง13.4): HttpOnly, Secure, and SameSite=Lax. secure: false is the documented escape hatch for plain-HTTP local development.

Properties

readonly
optional
name: string

Cookie name. Default 'setu_session'.

readonly
optional
path: string

Path scope. Default '/'.

readonly
optional
domain: string

Domain scope. Omitted by default, producing a host-only cookie.

readonly
optional
sameSite: "strict" | "lax" | "none"

SameSite policy. Default 'lax'.

readonly
optional
secure: boolean

Secure attribute. Default true.

readonly
optional
httpOnly: boolean

HttpOnly attribute. Default true.

Usage

import { type SessionCookieOptions } from "session-plugin/src/index.ts";