Libraries
    Preparing search index...

    Interface CookieOptions

    Options for the Set-Cookie header, controlling cookie lifetime, scope, and security attributes.

    interface CookieOptions {
        domain?: string;
        expires?: Date;
        httpOnly?: boolean;
        maxAge?: number;
        path?: string;
        sameSite?: "Strict" | "Lax" | "None";
        secure?: boolean;
    }
    Index

    Properties

    domain?: string

    Cookie domain.

    expires?: Date

    Absolute expiry date.

    httpOnly?: boolean

    Prevent client-side JS access.

    maxAge?: number

    Max lifetime in seconds.

    path?: string

    Cookie path (default "/").

    sameSite?: "Strict" | "Lax" | "None"

    SameSite attribute.

    secure?: boolean

    HTTPS only.