Skip to content

parseConsentFromHeader

function parseConsentFromHeader(cookieHeader, options): null | StoredConsent

Defined in: storage.ts:20

Parse a stored consent record from a raw Cookie header string. Useful on the server: pass the request’s cookie header. Returns null when the cookie isn’t present or is malformed.

Parameters

ParameterType
cookieHeaderundefined | string
optionsStorageOptions

Returns

null | StoredConsent