Logos DX
    Preparing search index...

    Interface CookieConfig

    Configuration for cookiePlugin().

    interface CookieConfig {
        adapter?: CookieAdapter;
        cookies?: Cookie[];
        exclude?: (string | RegExp)[];
        httpApi?: boolean;
        maxCookies?: number;
        maxCookieSize?: number;
        maxCookiesPerDomain?: number;
        syncOnRequest?: boolean;
    }
    Index

    Properties

    adapter?: CookieAdapter

    Persistence adapter for cross-instance and horizontal-scale scenarios. When provided, the jar loads cookies from the adapter at init and saves after every mutation.

    cookies?: Cookie[]

    Pre-seed the jar with these cookies before any requests. Useful for restoring a session from storage without a full adapter.

    exclude?: (string | RegExp)[]

    Domains or patterns to exclude from cookie handling. Useful for third-party CDN requests that shouldn't receive cookies.

    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).

    syncOnRequest?: boolean

    Re-load from adapter before every outgoing request. Use this when multiple FetchEngine instances share a backend (Redis). Default: false (adapter is only loaded at init).