Logos DX
    Preparing search index...

    Interface CookieJarOptions

    Options accepted by CookieJar.

    onChange is fired after every mutation. The plugin uses this to coalesce persistence via queueMicrotask — any burst of mutations in a single tick produces exactly one adapter save.

    interface CookieJarOptions {
        httpApi?: boolean;
        maxCookies?: number;
        maxCookieSize?: number;
        maxCookiesPerDomain?: number;
        onChange?: () => void;
    }

    Hierarchy (View Summary)

    • Pick<
          CookieConfig,
          "maxCookies"
          | "maxCookiesPerDomain"
          | "maxCookieSize"
          | "httpApi",
      >
      • CookieJarOptions
    Index

    Properties

    httpApi?: boolean

    Set to false if the client is a non-HTTP API (e.g., a script reading cookies directly). Causes httpOnly cookies to be excluded. Default: true.

    maxCookies?: number

    Maximum total cookies across all domains. Default: 3000 (RFC 6265 §6.1 minimum).

    maxCookieSize?: number

    Maximum bytes per cookie (name + value + attributes). Cookies exceeding this are silently dropped. Default: 4096 (RFC 6265 §6.1 minimum).

    maxCookiesPerDomain?: number

    Maximum cookies per domain. Excess cookies are evicted oldest-last-access-time first. Default: 50 (RFC 6265 §6.1 minimum).

    onChange?: () => void