Trilium Backend API
    Preparing search index...

    Interface CookieOptions

    Options passed down into res.cookie

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

    Properties

    domain?: string

    Domain name for the cookie. Defaults to the domain name of the app.

    encode?: (val: string) => string

    A synchronous function used for cookie value encoding. Defaults to encodeURIComponent.

    expires?: Date

    Expiry date of the cookie in GMT. If not specified (undefined), creates a session cookie.

    httpOnly?: boolean

    Flags the cookie to be accessible only by the web server.

    maxAge?: number

    Convenient option for setting the expiry time relative to the current time in milliseconds.

    partitioned?: boolean

    Marks the cookie to use partioned storage.

    path?: string

    Path for the cookie. Defaults to “/”.

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

    Value of the “Priority” Set-Cookie attribute.

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

    Value of the “SameSite” Set-Cookie attribute.

    secure?: boolean

    Marks the cookie to be used with HTTPS only.

    signed?: boolean

    Indicates if the cookie should be signed.