Setu-TS
    Preparing search index...

    Interface CookieAttributes

    Attributes controlling how a browser stores and returns a cookie.

    Every field is optional, and an omitted field emits no attribute rather than a default. Callers that want a secure cookie must say so: this codec applies no policy of its own, because the session plugin owns those defaults.

    0.2.0

    interface CookieAttributes {
        domain?: string;
        expires?: Date;
        httpOnly?: boolean;
        maxAge?: number;
        path?: string;
        sameSite?: "none" | "strict" | "lax";
        secure?: boolean;
    }
    Index
    domain?: string

    Domain scope. Omit for a host-only cookie, which is the safer default.

    expires?: Date

    Expires as an absolute date, for clients predating Max-Age.

    httpOnly?: boolean

    HttpOnly — hides the cookie from document.cookie.

    maxAge?: number

    Max-Age in seconds. 0 expires the cookie immediately (deletion).

    path?: string

    Path scope. Conventionally '/' for an application-wide cookie.

    sameSite?: "none" | "strict" | "lax"

    SameSite policy. 'none' is invalid without Secure, so serializeCookie emits Secure alongside it rather than producing a cookie browsers discard.

    secure?: boolean

    Secure — the cookie is only sent over HTTPS.