Documentation
    Preparing search index...

    Configuration options for HTTP cookies that can be set on the response

    type CookieOptions = {
        domain: string;
        expires: Date | (() => Date);
        httpOnly: boolean;
        maxAge: number | string;
        path: string;
        sameSite: boolean | "lax" | "none" | "strict";
        secure: boolean;
        partitioned?: boolean;
        priority?: "low" | "medium" | "high";
    }
    Index

    Properties

    domain: string

    Domain name for the cookie

    expires: Date | (() => Date)

    Expiration date for the cookie or function that returns the date

    httpOnly: boolean

    Whether the cookie should be accessible only through HTTP(S)

    maxAge: number | string

    Maximum age of the cookie in seconds or as a string

    path: string

    URL path for which the cookie is valid

    sameSite: boolean | "lax" | "none" | "strict"

    SameSite attribute to control cross-site request behavior

    secure: boolean

    Whether the cookie should only be sent over HTTPS

    partitioned?: boolean

    Whether the cookie should be partitioned (optional)

    priority?: "low" | "medium" | "high"

    Priority level for the cookie (optional)