Cookie scanner, phase 2: browser crawl through a shared scanner service
cookieScanner.crawl (opt-in) adds "Crawl site" to the Cookie review box. The
site asks the shared scanner service (services/cookie-crawler: Node +
Playwright, Dockerfile, deployed once on Coolify) to crawl its sitemap pages
twice, with no consent and after "Accept all". The service posts cookies,
storage keys and third-party hosts back to POST /api/ipal/cookie-crawl/results
(bearer token, running job only). No browser in the site.
Findings land as drafts through the same merge rules. Anything stored before
consent that is not necessary, and tracker requests before consent, are
violations, flagged on the review entries from the latest crawl only. The
cookie-crawl global keeps the latest result (no history). A dashboard warning
(CookieCrawlAlert) and an opt-in e-mail through the project's mail adapter
follow a crawl with violations or new unknown cookies. Scheduled crawls: a
Coolify scheduled task with the token. ipalEnvRules({ cookieCrawl: true }).
Also: the six older real-Payload tests no longer leave an orphaned
payload generate:types process (typescript.autoGenerate: false).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4f69f6ed20
commit
4bb9c663fd
@@ -905,6 +905,7 @@ project → **plugin gap**, not a copy.
|
||||
| A consent-dependent script | `ConsentScript` | consent.md |
|
||||
| Cookie table on the policy page | `<CookieTable>` (`/rsc`), `getCookieTable` | consent.md |
|
||||
| Cookie list filled from the panel (drafts the editor accepts) | `ipalKit({ cookieScanner: true })` + `pnpm generate:importmap` + migration; project cookies: `cookieScanner.declarations` / `integrations` — do not type the list by hand or build your own scanner | cookie-scanner.md |
|
||||
| Pre-consent check in a browser (button in the panel, violations, dashboard + e-mail warning) | `cookieScanner: { crawl: true }` + env `IPAL_COOKIE_SCAN_URL` / `IPAL_COOKIE_SCAN_TOKEN` (`ipalEnvRules({ cookieCrawl: true })`) + the site's `host=token` in the shared service's `IPAL_CRAWLER_SITES`; never Playwright/Chromium in the site | cookie-scanner.md → Browser crawl |
|
||||
| GA4, GTM, Pixel, Clarity, LinkedIn, TikTok | IDs in the panel — `SiteProviders` loads `Analytics` (`analytics={{ defer: true }}`; `consentMode: 'basic'` = no Google request before consent) | analytics.md |
|
||||
| Mail | `email: mailAdapter()`, `sendEmail` | email.md |
|
||||
| Env validation, health | `assertEnv(ipalEnvRules({…}))` (`/env`), `healthRoute` | env.md |
|
||||
@@ -928,6 +929,7 @@ payloadTotp } })`, never `twoFactor: false` without a client decision). CSP: fir
|
||||
| Plugin globals: write editor+ (Site Integrations: admin) | — | `ipalKit({ globalOverrides: { <slug>: { access, admin, hooks } } })`; a function `(global) => global` takes over (`applyGlobalOverrides`) |
|
||||
| Global saves revalidate the layout (with `ipalKit({ revalidatePath })`) | omit `revalidatePath`; once: `context: { disableRevalidate: true }` | `buildGlobalRevalidateHook` on your own globals |
|
||||
| Staff features without `access` (no roles field): every logged-in account passes (`userMeetsRole`) | add `access` (roles decide) | `globalOverrides`, `forms.formSubmissionOverrides`, `consentLog.collectionOverrides`, `stats.collectionOverrides` |
|
||||
| Cookie crawl (`crawl`): start editor+ or the token, results token-only for the running job, latest result only, dashboard warning on, e-mail off until recipients are set | omit `crawl`; `crawl.dashboard: false` | `crawl.serviceUrl` / `token` / `siteUrl` / `maxPages` / `acceptSelector` / `consentMode` / `trackerHosts` / `globalOverride`; *Cookie crawl → E-mail warnings to*; building blocks `ingestCrawlResult`, `findCrawlViolations`, `parseCrawlResult` |
|
||||
| Cookie review: scan + review editor+, delete admin; Open Cookie Database "Functional" → `functional` | omit `cookieScanner` | `cookieScanner.access`, `collectionOverrides`, `databaseCategories`, `integrations`, `declarations`, `labels`, `syncAccepted: false`; building blocks `runCookieScan`, `collectCookieFindings`, `applyCookieFindings` |
|
||||
| Consent records / stats visits: read and delete admin (stats view and chart follow `stats-visits` read access) | omit `consentLog` / `stats` | `consentLog.collectionOverrides`, `stats.collectionOverrides` (object merges `access`/`admin`/`hooks`, function takes over; `applyCollectionOverride`) |
|
||||
| Injected `users`: admin manages everyone, others only themselves | — | `access.authAccess` (your keys win); your own `users` collection wins whole |
|
||||
|
||||
@@ -62,6 +62,26 @@ list in the panel and you check it:
|
||||
"Functional" (it files some trackers there) — lower to `necessary` only when the cookie really
|
||||
is needed for the site to work.
|
||||
|
||||
## Pre-consent check from the panel (`cookieScanner.crawl`)
|
||||
|
||||
When the project has `cookieScanner: { crawl: true }` (cookie-scanner.md → Browser crawl):
|
||||
|
||||
1. Not on yet and the client wants it → turn it on; env `IPAL_COOKIE_SCAN_URL` +
|
||||
`IPAL_COOKIE_SCAN_TOKEN` (`openssl rand -hex 32`) in Coolify; ask the team to add
|
||||
`<host>=<token>` to the scanner service's `IPAL_CRAWLER_SITES`; `generate:importmap`,
|
||||
`migrate:create cookie-crawl`. Never add Playwright or Chromium to the site.
|
||||
2. *Cookie review* → **Crawl site**. "Crawl site" disabled → the box names the missing variable.
|
||||
Failed → *Settings → Cookie crawl → Error* ("Could not reach the scanner service" = URL / DNS /
|
||||
firewall; a Cloudflare challenge page = allow the Coolify server's IP).
|
||||
3. Filter the list by **Violation**: every entry is a non-necessary cookie or key stored before
|
||||
consent — fix it as in the table above (or, if it really is necessary, set its category and accept
|
||||
it). *Cookie crawl → Violations* also lists tracker **requests** before consent.
|
||||
4. Classify the new drafts (*Found by* = "Unknown — fill in"), then crawl again: 0 violations is
|
||||
the goal before handover.
|
||||
5. Optional: recipients in *Cookie crawl → E-mail warnings to*, and a weekly Coolify scheduled task
|
||||
`curl -X POST -H "Authorization: Bearer $IPAL_COOKIE_SCAN_TOKEN" $NEXT_PUBLIC_SERVER_URL/api/ipal/cookie-crawl`.
|
||||
Record both in `AGENTS.md` → "Project decisions".
|
||||
|
||||
## Cookie list for the cookie policy (cookie-scan)
|
||||
|
||||
After every change of tools (new pixel, chat, map, video) and before handing the site over
|
||||
|
||||
@@ -67,6 +67,9 @@ description: Complete map of everything @intecion/ipal-kit provides — every ip
|
||||
| `cookieScanner` | off | `cookie-review` collection (drafts an editor accepts → Cookie Settings → Cookies), "Scan cookies" box above its list (`CookieScanButton`), `GET`/`POST /api/ipal/cookie-scan`; a scan lists the cookies of the integrations switched on + names looked up in the bundled Open Cookie Database; never deletes, never overwrites edited text, never publishes by itself | `true` / object; after switching on: `pnpm generate:importmap` + `migrate:create`. Check: *Settings → Cookie review* → **Scan cookies** → drafts appear; set one to Accepted → it is in Cookie Settings → Cookies (cookie-scanner.md) |
|
||||
| `cookieScanner.declarations` / `.integrations` | built-ins only | the project's own cookies (`CookieDeclaration[]`), or `(defaults) => CookieIntegration[]` to add / change / drop integrations (`key`, `label`, `declarations`, `isEnabled(ctx)`) | e.g. a chat widget on when `ctx.integrations.chatId` is filled |
|
||||
| `cookieScanner.access` / `.collectionOverrides` / `.labels` | editor+ / none / `en` + `pl` | who may scan; changes `cookie-review` like `consentLog.collectionOverrides`; admin labels per language (`CookieScanLabels`) | object or function |
|
||||
| `cookieScanner.crawl` | off | browser pre-consent check through the shared scanner service (`services/cookie-crawler`, Coolify): **Crawl site** in the review box, `cookie-crawl` global (latest result only), `GET`/`POST /api/ipal/cookie-crawl`, `POST /api/ipal/cookie-crawl/results` (token), `violation` / `violationDetail` / `seenBeforeConsent` on `cookie-review`, `CookieCrawlAlert` on the dashboard, e-mail to *Cookie crawl → E-mail warnings to* | `true` / `CookieCrawlOptions`; env `IPAL_COOKIE_SCAN_URL` + `IPAL_COOKIE_SCAN_TOKEN`; `generate:importmap` + `migrate:create`. Check: the review box's **Crawl site** is enabled → click → "Last crawl …" with counts; `curl -X POST -H "Authorization: Bearer $IPAL_COOKIE_SCAN_TOKEN" $U/api/ipal/cookie-crawl` → 202 |
|
||||
| `cookieScanner.crawl.serviceUrl` / `.token` / `.siteUrl` / `.maxPages` / `.acceptSelector` | env URL / env token / `serverURL` → `NEXT_PUBLIC_SERVER_URL` / `20` / `[data-ipal="accept"]` | where the service is, the shared secret, the public origin crawled and called back, pages from the sitemap (max 100), the banner's accept button | options win over env |
|
||||
| `cookieScanner.crawl.consentMode` / `.trackerHosts` / `.dashboard` / `.globalOverride` | `'advanced'` / `DEFAULT_TRACKER_HOSTS` / `true` / none | `'basic'` also flags Google tag requests before consent; hosts counted as trackers; dashboard warning; changes the `cookie-crawl` global like `globalOverrides` | `(defaults) => [...defaults, 'chat.example']`; `dashboard: false` |
|
||||
| `cookieScanner.database` / `.databaseCategories` / `.syncAccepted` | `true` / Functional+Personalization → functional, Security+Necessary → necessary / `true` | Open Cookie Database lookup on or off; category map; accepting writes to Cookie Settings | `database: false`; `{ Functional: 'necessary' }`; `syncAccepted: false` |
|
||||
| `stats` | off | `stats-visits` collection, `POST /api/ipal/hit`, `/<admin>/stats` view, nav link, dashboard chart | `true` / object |
|
||||
| `stats.collectionOverrides` | none | changes `stats-visits` like `consentLog.collectionOverrides`; its `access.read` also decides who sees the stats view and dashboard chart | object or function |
|
||||
@@ -85,6 +88,7 @@ description: Complete map of everything @intecion/ipal-kit provides — every ip
|
||||
| auth collection (`users`) | `{ slug, auth: true, useAsTitle: 'email' }`, when the project has none (slug: `access.authCollection` → `twoFactor.collectionSlug` → `admin.user` → `'users'`); with `access`: create/delete/unlock admin only, read/update admin or self | `access.authAccess`; your own collection with that slug | yours wins |
|
||||
| `forms`, `form-submissions` | form-builder + ipal blocks `step`, `checkboxGroup`, `time` | `forms` | omit `forms` |
|
||||
| `consent-records` | proof of consent (id, choices, policy version; `consentLog.collectionOverrides`) | `consentLog` | off by default |
|
||||
| global `cookie-crawl` | latest browser crawl (status, counts, violations, third-party hosts) + e-mail recipients; read editor+, update admin | `cookieScanner.crawl` (`globalOverride`) | off by default |
|
||||
| `cookie-review` | cookie scanner drafts (`status` draft / accepted / rejected; create/read/update editor+, delete admin) | `cookieScanner` | off by default |
|
||||
| `stats-visits` | visits without IP (admin reads/deletes; `stats.collectionOverrides`) | `stats` | off by default |
|
||||
| global `site-settings` | General, Theme, [System Pages], [Emails], [Under construction], Search & AI, [Custom]; public read, write editor+ | `pages`, `content`, `forms.emailLayout`, `searchSettings` / `seo.searchSettings`, `siteSettingsFields` | always present; access/hooks/fields: `globalOverrides` |
|
||||
@@ -95,6 +99,7 @@ description: Complete map of everything @intecion/ipal-kit provides — every ip
|
||||
| `POST /api/ipal/test-email` | SMTP/Graph test (admin only) | — | **currently always** |
|
||||
| `POST /api/ipal/consent` | saves consent | `consentLog` | off by default |
|
||||
| `POST /api/ipal/hit` | page view for stats | `stats` | off by default |
|
||||
| `GET`/`POST /api/ipal/cookie-crawl`, `POST /api/ipal/cookie-crawl/results` | crawl status / start (editor+ or bearer token) / the scanner service's callback (token, running job only) | `cookieScanner.crawl` | off by default |
|
||||
| `GET`/`POST /api/ipal/cookie-scan` | integrations a scan covers / run a scan (`{ names? }`), editor+ | `cookieScanner` (`access`) | off by default |
|
||||
| `localization` | from `i18n` | `i18n` | **currently always** |
|
||||
| `routes.admin` | from `adminRoute` | `adminRoute` | — |
|
||||
@@ -110,7 +115,8 @@ description: Complete map of everything @intecion/ipal-kit provides — every ip
|
||||
| `AdminLogo`, `AdminIcon` | `graphics.Logo/Icon` | `whiteLabel` |
|
||||
| `IntecionCredit` | `afterLogin`, `afterNavLinks` | `whiteLabel` and `credit !== false` |
|
||||
| `StatsNavLink`, `StatsView` (`views.ipalStats`, `/stats`), `StatsWidget` (`beforeDashboard`) | nav, view, dashboard | `stats` (`dashboard: false` without the widget) |
|
||||
| `CookieScanButton` | `beforeListTable` of `cookie-review` | `cookieScanner` |
|
||||
| `CookieScanButton` | `beforeListTable` of `cookie-review` (with **Crawl site** when `crawl` is on) | `cookieScanner` |
|
||||
| `CookieCrawlAlert` | `beforeDashboard` | `cookieScanner.crawl` and `dashboard !== false` |
|
||||
| `IntegrationAlerts` | `beforeDashboard` | **currently always** (renders nothing when everything works) |
|
||||
| `IntegrationStatusBanner` | UI field in the Site Integrations tabs | always (with the global) |
|
||||
| `MaskedField` | SMTP / Turnstile secrets | always |
|
||||
@@ -156,6 +162,7 @@ Mandatory set: AGENT.md §0b, skill **ipal-setup**; checks: **ipal-audit**, **ip
|
||||
| forms — render | form block | `<RenderForm form={form} action={sendForm} locale={locale} texts={formTexts} classNames={formClasses} />` (`/rsc`) | form from the panel, Turnstile, message from Notifications | forms.md |
|
||||
| Turnstile | panel / env | `SiteProviders` wires `TurnstileProvider`; keys in Site Integrations → Turnstile or env; server: `verifyTurnstile` (`/server`) | widget in the form; dashboard alert on a bad key | turnstile.md |
|
||||
| consent | layout + policy page | banner via `SiteProviders`; table `<CookieTable rows={…} labels={…} />` (`/rsc`) from `getCookieTable` | `ipal-consent-check`; delete the consent cookie → the banner comes back | consent.md |
|
||||
| cookie crawl | config + env + service | `cookieScanner: { crawl: true }`, `IPAL_COOKIE_SCAN_URL` / `IPAL_COOKIE_SCAN_TOKEN`, site in the service's `IPAL_CRAWLER_SITES`; optional Coolify scheduled task `curl -X POST -H "Authorization: Bearer $IPAL_COOKIE_SCAN_TOKEN" $U/api/ipal/cookie-crawl` | **Crawl site** → "Last crawl …: N pages, N violations"; *Settings → Cookie crawl* | cookie-scanner.md → Browser crawl |
|
||||
| cookie list | config | `cookieScanner: true` (+ `declarations` for embeds/chat), `generate:importmap`, `migrate:create` | *Cookie review* → **Scan cookies** → accept → Cookie Settings → Cookies; `<CookieBanner settings="detailed">` lists it | cookie-scanner.md |
|
||||
| proof of consent | config + layout | `consentLog: true` + `logEndpoint="/api/ipal/consent"` | after a click, a document in Consent Records | consent.md |
|
||||
| stats | config + layout | `stats: true` + `<SiteProviders stats={{ locale }}>` (or `<PageStats locale />` inside `ConsentProvider`) | `/<admin>/stats`; `POST /api/ipal/hit` request in Network | stats.md |
|
||||
@@ -206,6 +213,7 @@ and what throws without `i18n`: frontend.md. `SiteProviders` props: `shell`, `ba
|
||||
| `NEXT_PUBLIC_TURNSTILE_SITE_KEY`, `TURNSTILE_SECRET_KEY` | `turnstile: true` (names: `siteKeyVar`/`secretVar`) | fallback for keys from Site Integrations → Turnstile; neither set → Turnstile off | panel (takes precedence) or env |
|
||||
| `INDEXNOW_KEY` | no | key from Site Integrations → IndexNow (generated) | env or panel |
|
||||
| `IPAL_IP_HEADER` | `ipHeader: true` + production | rate limit trusts any IP header (spoofing) + warning in prod | env: `cf-connecting-ip` (Cloudflare) / `x-forwarded-for` (Traefik/nginx) |
|
||||
| `IPAL_COOKIE_SCAN_URL`, `IPAL_COOKIE_SCAN_TOKEN` | `cookieScanner.crawl` (`ipalEnvRules({ cookieCrawl: true })` requires both in production; token ≥ 16 chars) | **Crawl site** disabled, the box names the missing variable | env; the token also goes into the scanner service's `IPAL_CRAWLER_SITES` as `host=token` |
|
||||
| `IPAL_NOINDEX` | no; `1`/`true`/`yes` **staging/preview only** | — (when set: robots Disallow, meta noindex, `X-Robots-Tag`, IndexNow sends nothing) | staging env |
|
||||
| `NEXT_PHASE` | set by Next | only tells `next build` from runtime: during the build an unreachable database gives an empty sitemap; at runtime the sitemap throws (route → 503) | do not set by hand |
|
||||
| `NEXT_RUNTIME` | set by Next | `instrumentation.ts` checks for `nodejs`; missing (scripts, seed) → `buildRevalidateHook` does not revalidate | do not set by hand |
|
||||
|
||||
@@ -25,6 +25,7 @@ Admin panel components from `@intecion/ipal-kit/admin` — the project does NOT
|
||||
| `RowLabel` | `@intecion/ipal-kit/admin` | Array row title in the panel taken from the row content (e.g. "Fast delivery" instead of "Item 01"). Do not wire by hand — use `rowLabel()`; after adding, `pnpm generate:importmap`. |
|
||||
| `AdminLogo` | `@intecion/ipal-kit/admin` | Server Component: large panel logo (login screen) from SiteSettings `logo`, fallback `siteName`. Injected by the plugin with `whiteLabel`; after turning the option on, `pnpm generate:importmap`. |
|
||||
| `AdminIcon` | `@intecion/ipal-kit/admin` | Server Component: small panel nav icon from SiteSettings `favicon`, fallback initials. Injected by the plugin with `whiteLabel`; after turning the option on, `pnpm generate:importmap`. |
|
||||
| `CookieCrawlAlert` | `@intecion/ipal-kit/admin` | Server Component: dashboard warning after a cookie crawl with violations or new unknown cookies, or a failed crawl; renders nothing otherwise. Injected with `cookieScanner.crawl` (`dashboard: false` drops it); after turning it on, `pnpm generate:importmap`. |
|
||||
| `CookieScanButton` | `@intecion/ipal-kit/admin` | "Scan cookies" box above the *Cookie review* list: integrations in use, optional extra names, runs `POST /api/ipal/cookie-scan`. Injected by the plugin with `cookieScanner`; after turning it on, `pnpm generate:importmap`. |
|
||||
| `IntecionCredit` | `@intecion/ipal-kit/admin` | The line "Technology supported by Intecion.com" below the nav and below the login form (`variant: 'nav' \| 'login'`). Injected by the plugin with `whiteLabel`; turn off: `whiteLabel: { credit: false }`. |
|
||||
|
||||
@@ -151,7 +152,23 @@ Opt-in with `ipalKit({ cookieScanner: true })`; the plugin wires the collection,
|
||||
| `COOKIE_REVIEW_SLUG` / `COOKIE_SCAN_PATH` | `@intecion/ipal-kit` | `'cookie-review'` / `'/ipal/cookie-scan'`. |
|
||||
| `COOKIE_SCAN_LABELS` / `mergeCookieScanLabels(overrides)` | `@intecion/ipal-kit` | Admin labels (`en`, `pl`) and the merge `cookieScanner.labels` uses. |
|
||||
|
||||
**Types:** `CookieScannerOptions` (the option), `CookieDeclaration`, `CookieIntegration`, `CookieScanContext`, `CookieFinding`, `CookieFindingSource`, `CookieStorage`, `LocalizedText`, `CookieScanSummary`, `CookieReviewValues`, `CookieDatabaseIndex`, `CookieScanLabels`, `OpenCookieCategory`.
|
||||
**Browser crawl** (`cookieScanner.crawl`; the browser runs in the shared service `services/cookie-crawler`, never in the site):
|
||||
|
||||
| Export | Import from | What it does / when |
|
||||
|---|---|---|
|
||||
| `buildCookieCrawlGlobal(labels)` / `buildCookieCrawlEndpoints({ labels, options, plugin })` | `@intecion/ipal-kit` | The `cookie-crawl` global (latest result only) and the three crawl endpoints — the plugin wires them with `crawl`; call only to wire by hand. |
|
||||
| `resolveCrawlConfig(crawlOptions, payload)` | `@intecion/ipal-kit` | Options → env (`IPAL_COOKIE_SCAN_URL`, `IPAL_COOKIE_SCAN_TOKEN`) → `serverURL` / `NEXT_PUBLIC_SERVER_URL` → `ResolvedCrawlConfig` (null = missing). |
|
||||
| `parseCrawlResult(body)` | `@intecion/ipal-kit` | Validates the service's JSON → `CrawlResult` (`CrawlObservation`, `CrawlRequest`) or null; junk dropped. |
|
||||
| `ingestCrawlResult({ payload, result, options, config, labels, plugin, req? })` | `@intecion/ipal-kit` | Applies a result: clears the previous flags, drafts for new names (same merge rules), `seenBeforeConsent` / `violation` / `violationDetail` → `CrawlIngestSummary`. |
|
||||
| `finishCrawl({ payload, labels, result, summary?, siteUrl?, req? })` | `@intecion/ipal-kit` | Writes the `cookie-crawl` global (done / failed) and sends the e-mail warning when recipients are set. |
|
||||
| `findCrawlViolations({ observations, requests, categoryOf, consentMode?, trackerHosts? })` | `@intecion/ipal-kit` | Pure rule: stored before consent and not `necessary` (unclassified counts), tracker requests before consent → `CrawlViolation[]`. |
|
||||
| `DEFAULT_TRACKER_HOSTS` / `GOOGLE_TAG_HOSTS` | `@intecion/ipal-kit` | Request hosts that are violations before consent; Google's only with `consentMode: 'basic'`. |
|
||||
| `sendCrawlWarning({ payload, labels, siteUrl, summary, to })` | `@intecion/ipal-kit` | The warning e-mail through `payload.sendEmail` (the project's mail adapter); never throws. |
|
||||
| `bearerMatches(header, token)` | `@intecion/ipal-kit` | Constant-time `Authorization: Bearer` check. |
|
||||
| `COOKIE_CRAWL_SLUG` / `COOKIE_CRAWL_PATH` / `COOKIE_CRAWL_RESULTS_PATH` | `@intecion/ipal-kit` | `'cookie-crawl'` / `'/ipal/cookie-crawl'` / `'/ipal/cookie-crawl/results'`. |
|
||||
| `COOKIE_SCAN_URL_ENV` / `COOKIE_SCAN_TOKEN_ENV` | `@intecion/ipal-kit` | `'IPAL_COOKIE_SCAN_URL'` / `'IPAL_COOKIE_SCAN_TOKEN'`. |
|
||||
|
||||
**Types:** `CookieScannerOptions` (the option), `CookieDeclaration`, `CookieIntegration`, `CookieScanContext`, `CookieFinding`, `CookieFindingSource`, `CookieStorage`, `LocalizedText`, `CookieScanSummary`, `CookieReviewValues`, `CookieDatabaseIndex`, `CookieScanLabels`, `OpenCookieCategory`, `CookieObservation` (a name with `storage` / `domain` for `collectCookieFindings`), `CookieReviewEntryRef` (`applyCookieFindings` `entries`); crawl: `CookieCrawlOptions`, `ResolvedCrawlConfig`, `CrawlResult`, `CrawlObservation`, `CrawlRequest`, `CrawlViolation`, `CrawlIngestSummary`.
|
||||
|
||||
## Under construction (`construction`) — details: `node_modules/@intecion/ipal-kit/docs/construction.md`
|
||||
|
||||
|
||||
@@ -393,6 +393,9 @@ ipalKit({
|
||||
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).
|
||||
- **Pre-consent check in a real browser:** `cookieScanner: { crawl: true }` + the shared scanner service
|
||||
— **Crawl site** in the panel, violations (non-necessary cookies or trackers before consent), dashboard
|
||||
warning, optional e-mail ([cookie-scanner.md → Browser crawl](./cookie-scanner.md#browser-crawl)).
|
||||
- **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`,
|
||||
|
||||
+191
-13
@@ -11,6 +11,11 @@ publish anything by itself.
|
||||
|
||||
Opt-in (`cookieScanner`, default off). Nothing is fetched at runtime and no browser is needed.
|
||||
|
||||
A second, also opt-in step — **Crawl site** (`cookieScanner.crawl`, see [Browser crawl](#browser-crawl)) —
|
||||
opens the site in a real browser twice (no consent / after "Accept all") through a shared scanner
|
||||
service, reports every non-necessary cookie or tracker present before consent as a violation, and adds
|
||||
what it finds to the same review list. The browser runs in the service, never in the site.
|
||||
|
||||
## Turn it on
|
||||
|
||||
```ts
|
||||
@@ -118,10 +123,11 @@ run the tests, commit.
|
||||
| `integrations` | built-ins | `(defaults) => integrations` — filter, change or add `CookieIntegration`s (each: `key`, `label`, `declarations`, `isEnabled(ctx)`) |
|
||||
| `database` | `true` | `false` = no Open Cookie Database lookup |
|
||||
| `databaseCategories` | table above | Partial map from database category to consent category |
|
||||
| `access` | editor and up | `({ req }) => boolean` — who may call the scan endpoint |
|
||||
| `access` | editor and up | `({ req }) => boolean` — who may scan, start a crawl and read its status |
|
||||
| `collectionOverrides` | — | Change `cookie-review`: an object merges `access` / `admin` / `hooks` key by key (your keys win), a function takes over (keep the slug) |
|
||||
| `labels` | `en`, `pl` | `{ de: { scanButton: 'Cookies scannen', … } }` — merged over the plugin's labels (`CookieScanLabels`) |
|
||||
| `syncAccepted` | `true` | `false` = accepting only marks the entry; nothing is written to Cookie Settings |
|
||||
| `crawl` | off | browser crawl through the scanner service — [Browser crawl](#browser-crawl) |
|
||||
|
||||
A project declaration:
|
||||
|
||||
@@ -186,8 +192,8 @@ All from `@intecion/ipal-kit` (server-safe), for your own admin view, a CLI or a
|
||||
| Export | What it does |
|
||||
|---|---|
|
||||
| `runCookieScan({ payload, plugin, options?, names?, req? })` | the whole scan as the endpoint runs it → `{ enabled, summary }` |
|
||||
| `collectCookieFindings({ ctx, integrations?, declarations?, names?, database?, databaseCategories? })` | findings without writing anything |
|
||||
| `applyCookieFindings({ payload, findings, req?, collection? })` | writes findings as drafts with the merge rules above → `CookieScanSummary` |
|
||||
| `collectCookieFindings({ ctx, integrations?, declarations?, names?, database?, databaseCategories? })` | findings without writing anything; `names` are strings or `CookieObservation`s (`{ name, storage?, domain? }`); `matches` maps each to its review key |
|
||||
| `applyCookieFindings({ payload, findings, entries?, req?, collection? })` | writes findings as drafts with the merge rules above → `CookieScanSummary` (`created`, `updated`, `unchanged`, `unknown`, `newUnknown`); `entries` collects `CookieReviewEntryRef`s |
|
||||
| `cookieScanContext(payload, plugin, req?)` | the `CookieScanContext` a scan uses |
|
||||
| `parseCookieNames(input)` | the panel's text box → clean names |
|
||||
| `mergeCookieReview(current, previous, next)`, `suggestionFor(finding, locales)` | the "never overwrite an edit" rule, pure |
|
||||
@@ -196,26 +202,198 @@ All from `@intecion/ipal-kit` (server-safe), for your own admin view, a CLI or a
|
||||
| `DEFAULT_COOKIE_INTEGRATIONS`, `DEFAULT_DATABASE_CATEGORIES`, `cookieNameMatches(pattern, name)` | declarations and matching |
|
||||
| `buildCookieReviewCollection(options)`, `buildCookieScanEndpoints(options, plugin)` | the collection and endpoints, to wire by hand |
|
||||
| `COOKIE_SCAN_LABELS`, `mergeCookieScanLabels(overrides)` | admin labels |
|
||||
| `CookieScanButton` (`/admin`) | the box above the list |
|
||||
| `CookieScanButton` (`/admin`) | the box above the list (with **Crawl site** when `crawl` is on) |
|
||||
| `CookieCrawlAlert` (`/admin`) | the dashboard warning (injected with `crawl`) |
|
||||
| `buildCookieCrawlGlobal(labels)`, `buildCookieCrawlEndpoints({ labels, options, plugin })` | the crawl's global and endpoints, to wire by hand |
|
||||
| `resolveCrawlConfig(crawlOptions, payload)` | options + env + `serverURL` → `ResolvedCrawlConfig` (what is missing) |
|
||||
| `parseCrawlResult(body)` | validates the service's JSON (`CrawlResult`, `CrawlObservation`, `CrawlRequest`) |
|
||||
| `ingestCrawlResult({ payload, result, options, config, labels, plugin })`, `finishCrawl(…)` | applies a result: drafts, flags (→ `CrawlIngestSummary`), then the global and the e-mail |
|
||||
| `findCrawlViolations({ observations, requests, categoryOf, consentMode?, trackerHosts? })` | the violation rule, pure (`CrawlViolation`) |
|
||||
| `DEFAULT_TRACKER_HOSTS`, `GOOGLE_TAG_HOSTS` | request hosts that count before consent |
|
||||
| `sendCrawlWarning({ payload, labels, siteUrl, summary, to })` | the e-mail, through `payload.sendEmail` |
|
||||
| `bearerMatches(header, token)` | constant-time bearer check |
|
||||
|
||||
Types: `CookieDeclaration`, `CookieIntegration`, `CookieScanContext`, `CookieFinding`,
|
||||
`CookieFindingSource`, `CookieStorage`, `LocalizedText`, `CookieScannerOptions`, `CookieScanSummary`,
|
||||
`CookieReviewValues`, `CookieDatabaseIndex`, `CookieScanLabels`, `OpenCookieCategory`.
|
||||
`CookieReviewValues`, `CookieDatabaseIndex`, `CookieScanLabels`, `OpenCookieCategory`,
|
||||
`CookieObservation`, `CookieReviewEntryRef`; crawl: `CookieCrawlOptions`, `ResolvedCrawlConfig`,
|
||||
`CrawlResult`, `CrawlObservation`, `CrawlRequest`, `CrawlViolation`, `CrawlIngestSummary`.
|
||||
|
||||
## The browser scan in the skill
|
||||
## Browser crawl
|
||||
|
||||
The panel scan knows what the plugin and the project declare. What a page really sets (a GTM tag, an
|
||||
iframe, a script pasted into a block) shows only in a browser: `ipal-consent-check` → cookie-scan
|
||||
(`cookie-scan.mjs`, Playwright on the developer's machine) lists every cookie before and after
|
||||
consent and fails on a non-necessary cookie set before consent. Paste the names it reports as
|
||||
unknown into **More cookie names** to get them into the review list.
|
||||
What a page really sets — a GTM tag, an iframe, a script pasted into a block — shows only in a
|
||||
browser. `cookieScanner.crawl` adds **Crawl site** to the *Cookie review* box. One shared **scanner
|
||||
service** (`services/cookie-crawler` in the ipal-kit repository, run by the team on Coolify) does the
|
||||
browsing for every site:
|
||||
|
||||
```
|
||||
editor ── Crawl site ──▶ site POST /api/ipal/cookie-crawl
|
||||
site ── POST {IPAL_COOKIE_SCAN_URL}/crawl (Bearer token) ──▶ scanner service
|
||||
crawls the sitemap pages twice:
|
||||
1. fresh profile, no decision
|
||||
2. fresh profile, clicks "Accept all"
|
||||
site POST /api/ipal/cookie-crawl/results (Bearer token) ◀── cookies, storage keys, third-party hosts
|
||||
→ drafts in Cookie review, violations, Cookie crawl global, dashboard warning, e-mail
|
||||
```
|
||||
|
||||
### Turn it on in a site
|
||||
|
||||
```ts
|
||||
ipalKit({
|
||||
cookieScanner: { crawl: true },
|
||||
})
|
||||
```
|
||||
|
||||
1. **Env** (Coolify → the site → Environment Variables):
|
||||
|
||||
| Variable | Value |
|
||||
|---|---|
|
||||
| `IPAL_COOKIE_SCAN_URL` | the service's URL, e.g. `https://cookie-crawler.intecion.net` |
|
||||
| `IPAL_COOKIE_SCAN_TOKEN` | a random token of at least 16 characters (`openssl rand -hex 32`), the same one as in the service's `IPAL_CRAWLER_SITES` entry for this site |
|
||||
| `NEXT_PUBLIC_SERVER_URL` | already set — the public origin the service crawls and calls back (or Payload `serverURL`, or `crawl.siteUrl`) |
|
||||
|
||||
Validate them at startup: `assertEnv(ipalEnvRules({ cookieCrawl: true }))` (required in production).
|
||||
2. **Import map:** `pnpm generate:importmap` (the dashboard warning `CookieCrawlAlert`).
|
||||
3. **Migration (Postgres / SQLite):** `crawl` adds the `cookie-crawl` global and three fields to
|
||||
`cookie-review` (`violation`, `violationDetail`, `seenBeforeConsent`):
|
||||
`pnpm payload migrate:create cookie-crawl`, commit; Coolify runs `payload migrate` on deploy.
|
||||
4. **Service:** add the site to the service's `IPAL_CRAWLER_SITES` (below) and redeploy the service.
|
||||
5. **Verify:** *Cookie review* shows "Crawl site" enabled (when disabled, the box names the missing env
|
||||
var). Click it: the status says "Crawling…", then after one to a few minutes "Last crawl …: N pages,
|
||||
N violations, N new unknown" and the list reloads. *Settings → Cookie crawl* shows the latest
|
||||
result. A test: put a `<script>document.cookie='_fbp=x'</script>` in a block on a staging page →
|
||||
the next crawl reports `_fbp` as a violation and the dashboard shows the warning.
|
||||
|
||||
### What a crawl records and reports
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Pages | the site URL + up to `maxPages` (default 20, max 100) same-origin URLs from `/sitemap.xml` (one level of sitemap index) |
|
||||
| Recorded per run | cookies (name, domain), `localStorage` and `sessionStorage` keys, hosts of third-party requests, with the first pages they appeared on |
|
||||
| New findings | every cookie / key goes through the same lookup and merge rules as **Scan cookies** — new names become **drafts**, edited text is kept, status is never changed, nothing is deleted |
|
||||
| Violation (cookie or key) | seen **before consent** and its review entry's category is not `necessary` — an entry without a category counts too, until an editor classifies it |
|
||||
| Violation (request) | a request **before consent** to a tracker host (`DEFAULT_TRACKER_HOSTS`: Meta, LinkedIn, TikTok, Clarity, Bing, Hotjar, YouTube). Google's tag hosts (`GOOGLE_TAG_HOSTS`) count only with `consentMode: 'basic'` — in `advanced` (the plugin's default) the Google tag may load before consent with every signal denied |
|
||||
| Review entries | `seenBeforeConsent`, `violation` and `violationDetail` ("before consent on /, /about") — from the **latest crawl only**: every crawl clears the previous flags |
|
||||
| Cookie crawl global | latest result only (no history): status, started / finished, by whom, pages, counts, violations, third-party hosts, error |
|
||||
| "Accept all" not found | the second run had no consent — the global's error says so (`crawl.acceptSelector` for a custom banner) |
|
||||
| Dashboard | a warning above the dashboard after a crawl with violations or new unknown cookies, or a failed crawl (`crawl.dashboard: false` turns it off) |
|
||||
| E-mail | opt-in per site: *Settings → Cookie crawl → E-mail warnings to* (admin; comma-separated). Sent after a crawl with violations or new unknown cookies, through the project's Payload email adapter (`email: mailAdapter()`, email.md). Empty = no e-mail |
|
||||
|
||||
A crawl still "running" after 30 minutes counts as failed (the service never reported back), and a new
|
||||
one may start. One crawl per site at a time (`409` otherwise).
|
||||
|
||||
### Scheduled crawls
|
||||
|
||||
A Coolify **Scheduled Task** on the site's application (or any cron) starts a crawl with the token —
|
||||
no editor session needed:
|
||||
|
||||
```bash
|
||||
curl -fsS -X POST -H "Authorization: Bearer $IPAL_COOKIE_SCAN_TOKEN" "$NEXT_PUBLIC_SERVER_URL/api/ipal/cookie-crawl"
|
||||
```
|
||||
|
||||
Weekly is plenty (`0 6 * * 1`). New violations or unknown cookies then show on the dashboard and, when
|
||||
recipients are set, by e-mail.
|
||||
|
||||
### `crawl` options
|
||||
|
||||
`crawl: true` or `CookieCrawlOptions`:
|
||||
|
||||
| Key | Default | What it does |
|
||||
|---|---|---|
|
||||
| `serviceUrl` | env `IPAL_COOKIE_SCAN_URL` | scanner service base URL |
|
||||
| `token` | env `IPAL_COOKIE_SCAN_TOKEN` | shared secret (≥ 16 characters); shorter = not configured |
|
||||
| `siteUrl` | Payload `serverURL`, else `NEXT_PUBLIC_SERVER_URL` | public origin to crawl; the callback goes to `<siteUrl>/api/ipal/cookie-crawl/results` |
|
||||
| `maxPages` | `20` (max 100) | sitemap pages besides the site URL |
|
||||
| `acceptSelector` | `[data-ipal="accept"]` | the banner's "Accept all" button (the plugin's `CookieBanner` has it in every mode) |
|
||||
| `consentMode` | `'advanced'` | `'basic'` = Google tag requests before consent are violations too — match the project's `SiteProviders analytics={{ consentMode }}` |
|
||||
| `trackerHosts` | `DEFAULT_TRACKER_HOSTS` | `(defaults) => [...defaults, 'widget.chat.example']` |
|
||||
| `dashboard` | `true` | `false` = no dashboard warning |
|
||||
| `globalOverride` | — | change the `cookie-crawl` global like `globalOverrides` (object merges `access` / `admin` / `hooks`, a function takes over) |
|
||||
|
||||
Access: start a crawl and read its status — editor and up (`cookieScanner.access`), or the bearer
|
||||
token; the results endpoint — the bearer token only, and only for the running job id; the
|
||||
`cookie-crawl` global — read editor and up, update (the e-mail field) admin.
|
||||
|
||||
### Endpoints
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| `GET /api/ipal/cookie-crawl` | `{ configured, missing, status, startedAt, finishedAt, summary, error }` |
|
||||
| `POST /api/ipal/cookie-crawl` | starts a crawl → `202`; `403`, `409` (one is running), `503` (not configured), `502` (service unreachable — the global says why) |
|
||||
| `POST /api/ipal/cookie-crawl/results` | the service's callback: `Authorization: Bearer <token>`, body = the wire format (`CrawlResult`) → `200`; `401`, `400`, `409` (not the running job) |
|
||||
|
||||
Paths: `COOKIE_CRAWL_PATH`, `COOKIE_CRAWL_RESULTS_PATH`; env names: `COOKIE_SCAN_URL_ENV`,
|
||||
`COOKIE_SCAN_TOKEN_ENV`; global slug `COOKIE_CRAWL_SLUG`.
|
||||
|
||||
### Scanner service on Coolify
|
||||
|
||||
One service for every site the team runs. Code: `services/cookie-crawler/` in the ipal-kit repository
|
||||
(Node + Playwright, no other dependency; not part of the npm package).
|
||||
|
||||
1. **Coolify → Project → New Resource → Application** from the ipal-kit Git repository.
|
||||
- Build pack: **Dockerfile**; base directory `services/cookie-crawler`; Dockerfile `Dockerfile`.
|
||||
- Port: `3000`. Health check path: `/health` (the image also has a Docker `HEALTHCHECK`).
|
||||
- Domain: e.g. `https://cookie-crawler.intecion.net` (Coolify issues the certificate).
|
||||
- Resources: 1–2 GB RAM, 1 CPU per concurrent crawl (Chromium). Keep `CRAWLER_CONCURRENCY=1`
|
||||
unless the server has room.
|
||||
2. **Environment variables:**
|
||||
|
||||
| Variable | Default | |
|
||||
|---|---|---|
|
||||
| `IPAL_CRAWLER_SITES` | — (required) | `acme.pl=TOKEN1,shop.example.com=TOKEN2` — the sites it may crawl, each with its own token (≥ 16 characters; `www.` is ignored). A token only opens its own site |
|
||||
| `PORT` | `3000` | |
|
||||
| `CRAWLER_CONCURRENCY` | `1` | crawls at the same time |
|
||||
| `CRAWLER_QUEUE_MAX` | `20` | waiting crawls; more → `429` |
|
||||
| `CRAWLER_JOB_TIMEOUT_MS` | `600000` | a longer crawl is reported as failed |
|
||||
| `CRAWLER_WAIT_MS` | `3000` | wait on every page for late tags (`defer` analytics) |
|
||||
| `CRAWLER_ALLOW_HTTP` | unset | `1` only for local tests; sites must be https |
|
||||
|
||||
3. **Deploy**, then check: `curl https://cookie-crawler.intecion.net/health` → `{"ok":true,…}`.
|
||||
4. **Adding a site:** generate a token, add `host=token` to `IPAL_CRAWLER_SITES`, redeploy the service;
|
||||
set the same token as the site's `IPAL_COOKIE_SCAN_TOKEN`.
|
||||
5. **Updating Playwright:** the npm version in `services/cookie-crawler/package.json` and the image tag
|
||||
in its `Dockerfile` (`mcr.microsoft.com/playwright:v1.64.0-noble`) must match; change both, redeploy.
|
||||
|
||||
What the service refuses: a site not in `IPAL_CRAWLER_SITES`, a token that is not that site's, a
|
||||
callback URL on another origin than the site, plain http. It crawls only the listed origins (no
|
||||
open proxy), runs Chromium as the image's non-root user, and keeps nothing after a crawl.
|
||||
|
||||
**DNS and network:**
|
||||
|
||||
- One DNS record for the service: `cookie-crawler.<team domain>` → `A`/`AAAA` to the Coolify server
|
||||
(the team runs the zone; add it with the other records, deployment.md §6). No record is needed per
|
||||
site.
|
||||
- The **site** must reach the service URL (outbound HTTPS from the site container), and the **service**
|
||||
must reach each site's public URL (outbound HTTPS) — the crawl must go through the public domain,
|
||||
CDN and proxy, as a visitor's browser does. On the same Coolify server both go out and back through
|
||||
the public domain; do not point `siteUrl` at an internal container name (cookies are set for the
|
||||
public domain).
|
||||
- Sites behind Cloudflare (WAF, Bot Fight Mode, "Under Attack"): allow the Coolify server's IP, or the
|
||||
crawl sees a challenge page instead of the site. Every crawler request carries the header
|
||||
`X-Ipal-Cookie-Crawler: 1` for a WAF rule.
|
||||
- The crawler's page views land in the site's stats and analytics like any visitor without consent
|
||||
(cookieless) and with consent on the second run. Filter the Coolify server's IP in GA4 if it matters.
|
||||
|
||||
### From a laptop or CI
|
||||
|
||||
The same crawl, without the service: `cd services/cookie-crawler && npm install && npx playwright
|
||||
install chromium`, then `node cli.mjs https://acme.pl --pages 10` prints the result as JSON (exit code
|
||||
1 when anything but the consent cookie is stored before consent). It does not know the site's
|
||||
categories — the panel's **Crawl site** gives the verdict. `ipal-consent-check` → cookie-scan
|
||||
(`cookie-scan.mjs`) stays the quick check for projects without the service; paste the names it reports
|
||||
as unknown into **More cookie names**.
|
||||
|
||||
## Turn off, override, extend
|
||||
|
||||
- **Turn off the crawl only:** omit `crawl` (default) — no `cookie-crawl` global, no crawl endpoints, no
|
||||
dashboard warning, no violation fields; `dashboard: false` keeps the crawl without the warning.
|
||||
- **Turn off:** omit `cookieScanner` (default). Turning it off later keeps no endpoint and no
|
||||
collection; Cookie Settings → Cookies keeps every row (it is still edited by hand or by the skill's
|
||||
import script).
|
||||
- **Override:** `collectionOverrides` (access, admin, hooks), `access` (who scans), `labels`,
|
||||
`databaseCategories`, `integrations` (change or drop a built-in), `syncAccepted: false`.
|
||||
`databaseCategories`, `integrations` (change or drop a built-in), `syncAccepted: false`; for the
|
||||
crawl `serviceUrl`, `token`, `siteUrl`, `maxPages`, `acceptSelector`, `consentMode`, `trackerHosts`,
|
||||
`globalOverride`.
|
||||
- **Extend:** `declarations` and `integrations` for the project's own cookies; the building blocks
|
||||
above for your own UI, CLI or scheduled scan.
|
||||
above for your own UI, CLI or scheduled scan; the crawl's wire format (`CrawlResult`) to feed results
|
||||
from another crawler.
|
||||
|
||||
@@ -74,6 +74,7 @@ URLs point at that domain. Outside production, `R2_PUBLIC_URL` alone → read-on
|
||||
| `IPAL_IP_HEADER` | ⬜ (✅ prod) | forms | header with the real IP for the rate limit (`cf-connecting-ip`, `x-forwarded-for`); without it, a warning in the log |
|
||||
| `NEXT_PUBLIC_TURNSTILE_SITE_KEY`, `TURNSTILE_SECRET_KEY` | ⬜ | forms | fallback when the Turnstile keys are not in Site Integrations |
|
||||
| `INDEXNOW_KEY` | ⬜ | SEO | IndexNow key (takes precedence over the key from the panel) |
|
||||
| `IPAL_COOKIE_SCAN_URL`, `IPAL_COOKIE_SCAN_TOKEN` | ⬜ (✅ prod with `ipalEnvRules({ cookieCrawl: true })`) | consent | cookie crawl (`cookieScanner.crawl`): the shared scanner service's URL and this site's token ([cookie-scanner.md](./cookie-scanner.md#browser-crawl)) |
|
||||
| `IPAL_NOINDEX` | ⬜ | SEO | `1`/`true`/`yes` **on staging only** — the whole site is noindex (robots, meta, `X-Robots-Tag`) |
|
||||
|
||||
"✅ prod" = required by `ipalEnvRules({ storage: true })` / `({ ipHeader: true })` with
|
||||
@@ -446,6 +447,8 @@ be attached. Options, in order of preference:
|
||||
3. A reverse proxy/cache on the Coolify server (`media.klient.pl` → the bucket) — possible, more moving parts.
|
||||
4. `*.r2.dev` — rate-limited, **dev/testing only**, never production.
|
||||
|
||||
**Cookie crawler (once per team, not per site):** `cookie-crawler.<team domain>` → `A`/`AAAA` to the Coolify server running the scanner service ([cookie-scanner.md](./cookie-scanner.md#scanner-service-on-coolify)). A site using `cookieScanner.crawl` needs no record of its own.
|
||||
|
||||
**No DNS records needed:** Turnstile (hostname list set in the Cloudflare panel on the widget, not in
|
||||
DNS), IndexNow (key file served by the app), llms.txt, MCP, Markdown, sitemap.
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ use).
|
||||
ipalEnvRules({
|
||||
storage?: boolean | { requirePublicUrl?: boolean }, // R2_* (R2_BUCKET, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_ENDPOINT; R2_PUBLIC_URL optional)
|
||||
emailGraph?: boolean, // GRAPH_* (GRAPH_TENANT_ID, GRAPH_CLIENT_ID, GRAPH_CLIENT_SECRET, GRAPH_SENDER — e-mail)
|
||||
cookieCrawl?: boolean, // IPAL_COOKIE_SCAN_URL (url), IPAL_COOKIE_SCAN_TOKEN (≥ 16 chars) — required in production; cookieScanner.crawl (cookie-scanner.md)
|
||||
ipHeader?: boolean, // IPAL_IP_HEADER — required in production, optional outside it (header name [a-z0-9-])
|
||||
turnstile?: boolean | { siteKeyVar?: string; secretVar?: string }, // NEXT_PUBLIC_TURNSTILE_SITE_KEY, TURNSTILE_SECRET_KEY
|
||||
serverUrlVar?: string, // default 'NEXT_PUBLIC_SERVER_URL'
|
||||
|
||||
Reference in New Issue
Block a user