Cookie scanner, phase 1: declarations, database lookup, review list
ipalKit({ cookieScanner }) (opt-in) adds the cookie-review collection, a
"Scan cookies" box above its list and GET/POST /api/ipal/cookie-scan. A scan
lists the cookies of every integration the project switches on (consent,
admin login, locale, stats, GA4, GTM, Meta Pixel, Clarity, LinkedIn, TikTok,
Turnstile), the project's own declarations, and extra names looked up in the
bundled Open Cookie Database, as drafts. Editors accept (→ Cookie Settings →
Cookies, every locale, only empty text filled), edit or reject. A rescan never
deletes, never changes status and never overwrites edited text.
Everything is overridable (access, collectionOverrides, integrations,
declarations, databaseCategories, labels, syncAccepted) and the building
blocks are exported. Admin labels in en + pl. Docs: cookie-scanner.md,
consent.md, AGENT.md, ipal-reference, ipal-consent-check.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ab45cf48be
commit
a0545b6716
+7
-3
@@ -252,7 +252,8 @@ window width `max-w-4xl` — change it with `classNames.dialog`.
|
||||
|
||||
Which mode to choose: the project design decides. If the brief is silent → `'detailed'` (at the moment of
|
||||
consent the user sees which cookies are set and by whom — full information where the decision is made),
|
||||
provided the Cookies list is filled from a scan (`ipal-consent-check` → cookie-scan); an empty list = a
|
||||
provided the Cookies list is filled from a scan (`ipalKit({ cookieScanner: true })` → *Cookie review* → **Scan cookies**,
|
||||
[cookie-scanner.md](./cookie-scanner.md), or `ipal-consent-check` → cookie-scan); an empty list = a
|
||||
window without expandable lists, then `'modal'` is enough. Record the decision in `AGENTS.md` →
|
||||
"Project decisions".
|
||||
|
||||
@@ -342,8 +343,9 @@ independent consent state).
|
||||
choices, the policy version and the time — **no IP and no user agent**. *Consent records* collection
|
||||
(admin only), automatic cleanup after `retentionDays` (default 1095). Details below. Postgres:
|
||||
`migrate:create`.
|
||||
- **Cookie table** for the policy page: Cookie Settings → *Cookies* (filled by a scan,
|
||||
skill `ipal-consent-check` → cookie-scan) + `getCookieTable` + `<CookieTable>` from `/rsc`.
|
||||
- **Cookie table** for the policy page: Cookie Settings → *Cookies* + `getCookieTable` + `<CookieTable>` from `/rsc`.
|
||||
Fill the list from the panel with the cookie scanner (`cookieScanner` option — drafts an editor accepts,
|
||||
[cookie-scanner.md](./cookie-scanner.md)) and check the real site with `ipal-consent-check` → cookie-scan.
|
||||
- Consent cookie: `cookie-consent` (`CONSENT_COOKIE`), JSON `{ id, state, timestamp, version }`,
|
||||
`max-age` 180 days (`CONSENT_MAX_AGE`), `samesite=lax`, `Secure` on HTTPS. Consent with another
|
||||
policy version is treated as no decision.
|
||||
@@ -389,6 +391,8 @@ ipalKit({
|
||||
global (write access is `admin` + `editor` by default, hooks, admin options):
|
||||
`ipalKit({ globalOverrides: { 'cookie-settings': { access: { update } } } })` — your access rules win,
|
||||
your hooks run after the plugin's; a function gets the plugin's global and returns the one to use.
|
||||
- **Cookie list from the panel:** `ipalKit({ cookieScanner: true })` — opt-in, see
|
||||
[cookie-scanner.md](./cookie-scanner.md) (off, overrides and building blocks there).
|
||||
- **Extend:** `cookieMap` (your own cookies to delete), `ConsentScript` (scripts without Consent
|
||||
Mode), `useConsentContext()` (your own UI: `state`, `acceptAll`, `rejectAll`, `savePreferences`,
|
||||
`reopen`, `texts`), server-safe helpers (`parseConsent`, `readConsentRecord`, `CONSENT_COOKIE`,
|
||||
|
||||
Reference in New Issue
Block a user