Review C-1: the endpoint, on on every site, parsed a 20 MB body. It now refuses a content-length over CONSENT_LOG_MAX_BYTES (4096) before reading and reads the stream only up to the cap (readCappedBody), so a missing or false length cannot make it hold more. A version above Cookie settings' policy version is 400 (the cached version is read again once, for an editor's fresh raise); versions from 1 up are accepted (pages rendered before a raise). Review C-2: consent-log-migration is a warning, like every consent check of 1.17.0 (the owner's decision). Co-Authored-By: Claude Opus 5.5 <[email protected]>
31 lines
1.4 KiB
TypeScript
31 lines
1.4 KiB
TypeScript
// Server-safe exports (logic, types, helper). Client components (banner,
|
|
// provider, hook) are exported separately via ./client to keep the RSC/client
|
|
// boundary clean.
|
|
export {
|
|
ACCEPT_ALL_CONSENT,
|
|
CONSENT_CATEGORIES,
|
|
DEFAULT_CONSENT,
|
|
REJECT_ALL_CONSENT,
|
|
} from './categories.js'
|
|
export type { ConsentCategory, ConsentState } from './categories.js'
|
|
export { CONSENT_CATEGORY_LABELS, consentCategoryOptions } from './categoryLabels.js'
|
|
export { buildConsentLogCollection, buildConsentLogEndpoint, CONSENT_LOG_MAX_BYTES, CONSENT_LOG_PATH, CONSENT_LOG_SLUG, readCappedBody } from './consentLog.js'
|
|
export type { ConsentLogOptions } from './consentLog.js'
|
|
export { consentBannerScript } from './firstPaint.js'
|
|
export type { ConsentBannerScriptOptions } from './firstPaint.js'
|
|
export { CONSENT_FALLBACK, CONSENT_FALLBACK_PL, consentFallback, getConsentTexts, getCookieTable } from './getConsentTexts.js'
|
|
export type { CookieTableRow } from './getConsentTexts.js'
|
|
export { setDefaultConsent, updateConsent } from './googleConsent.js'
|
|
export { GPC_CATEGORIES, GPC_HEADER, gpcFromHeaders, gpcFromNavigator, gpcWellKnown, resolveConsent } from './gpc.js'
|
|
export type { GpcMode, ResolvedConsent } from './gpc.js'
|
|
export {
|
|
CONSENT_COOKIE,
|
|
CONSENT_MAX_AGE,
|
|
CONSENT_VERSION,
|
|
newConsentId,
|
|
parseConsent,
|
|
readConsentRecord,
|
|
serializeConsent,
|
|
} from './storage.js'
|
|
export type { ConsentStorage, ConsentTexts } from './texts.js'
|