Skip to content

Latest commit

 

History

History
146 lines (65 loc) · 2.6 KB

File metadata and controls

146 lines (65 loc) · 2.6 KB

Home > tough-cookie > CreateCookieJarOptions

CreateCookieJarOptions interface

Configuration settings to be used with a CookieJar.

Signature:

interface CreateCookieJarOptions 

Properties

Property

Modifiers

Type

Description

allowSecureOnLocal?

boolean | undefined

(Optional) Flag to indicate if localhost and loopback addresses with an unsecure scheme should store and retrieve Secure cookies.

If true, localhost, loopback addresses or similarly local addresses are treated as secure contexts and thus will store and retrieve Secure cookies even with an unsecure scheme.

If false, only secure schemes (https and wss) will store and retrieve Secure cookies.

allowSpecialUseDomain?

boolean | undefined

(Optional) Accepts special-use domains such as local. This is not in the standard, but is used sometimes on the web and is accepted by most browsers. It is also useful for testing purposes.

Defaults to true if not specified.

looseMode?

boolean | undefined

(Optional) Accept malformed cookies like bar and =bar, which have an implied empty name but are not RFC-compliant.

Defaults to false if not specified.

prefixSecurity?

'strict' | 'silent' | 'unsafe-disabled' | undefined

(Optional) Controls how cookie prefixes are handled. See PrefixSecurityEnum.

Defaults to silent if not specified.

rejectPublicSuffixes?

boolean | undefined

(Optional) Reject cookies that match those defined in the Public Suffix List (e.g.; domains like "com" and "co.uk").

Defaults to true if not specified.