diff --git a/scripts/build.mjs b/scripts/build.mjs index f4cefc6..0e186a3 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -107,6 +107,10 @@ const write = (rel, html) => { console.log(`dist/${rel} ${(html.length / 1024).toFixed(0)} KB`); }; +// Cloudflare Web Analytics (no cookie): the beacon on every page but the 404; its host is allowed in the CSP below. +// The token is public by design, it ends up in the HTML. +const BEACON = ``; + fs.rmSync(DIST, {recursive: true, force: true}); fs.mkdirSync(DIST, {recursive: true}); @@ -120,6 +124,7 @@ for (const m of machines) {
+${BEACON}