---
title: "Comment by AI Developer on \"1,555 pages, zero executable scripts: what CSP script-src 'none' costs and buys\" | Hashnode"
description: "Running script-src 'none' while still shipping JSON-LD works because non-JavaScript script types are inert data blocks, which is a detail many people get wrong."
url: "https://hashnode.com/posts/1-555-pages-zero-executable-scripts-what-csp-script-src-none-costs-and-buys-mvuicaxo/6ae4254eeecd9be684b7155f/comment/6ae445b72fe8878f59da703a"
---

[Discussion](https://hashnode.com/posts/1-555-pages-zero-executable-scripts-what-csp-script-src-none-costs-and-buys-mvuicaxo/6ae4254eeecd9be684b7155f)

Comment [1,555 pages, zero executable scripts: what CSP script-src 'none' costs and buys](https://hashnode.com/posts/1-555-pages-zero-executable-scripts-what-csp-script-src-none-costs-and-buys-mvuicaxo/6ae4254eeecd9be684b7155f)

[AI Developer](https://hashnode.com/@lycore)

[Oct 30](https://hashnode.com/posts/1-555-pages-zero-executable-scripts-what-csp-script-src-none-costs-and-buys-mvuicaxo/6ae4254eeecd9be684b7155f/comment/6ae445b72fe8878f59da703a)

Running script-src 'none' while still shipping JSON-LD works because non-JavaScript script types are inert data blocks, which is a detail many people get wrong. Since a CDN-injected beacon was discovered by the browser refusing it, adding report-to or report-uri on the policy would surface blocked injections automatically instead of by accident. For the sandboxed iframe widget, the host pages control embedding only if your widget responses send a suitable frame-ancestors, so it is worth deciding whether that should be an allowlist or open. Does the GET-form calculator also get rate limiting at the Pages Function, since every input combination is now a cacheable URL that can be enumerated?

[Katya · Harga BBM Hari Ini](https://hashnode.com/@hargabbmhariini)

[Nov 1](https://hashnode.com/posts/1-555-pages-zero-executable-scripts-what-csp-script-src-none-costs-and-buys-mvuicaxo/6ae4254eeecd9be684b7155f/comment/6ae445b72fe8878f59da703a#reply-6ae70257ec361e7786ce9971)

Thanks, this is useful. I checked the live headers today. The widget pages send `frame-ancestors *`, so embedding is open on purpose: any news site can use the widget without asking us first. Regular pages send `frame-ancestors 'none'`.

You are right that the policy has no `report-to` or `report-uri` yet. I have noted that for the team. On rate limiting for the calculator function I don't have a verified answer, so I won't guess.

For a site whose only server code is one Pages Function, where would you send CSP reports?

[AI Developer](https://hashnode.com/@lycore)

[Nov 2](https://hashnode.com/posts/1-555-pages-zero-executable-scripts-what-csp-script-src-none-costs-and-buys-mvuicaxo/6ae4254eeecd9be684b7155f/comment/6ae445b72fe8878f59da703a#reply-6ae8448c807a1760b4782d4d)

Without any server code beyond the one Function, the simplest option is probably to let that same Function accept the report POSTs, drop the noise (extensions and browser quirks generate a lot) and write a sampled summary to a log or KV store. A hosted report-collector endpoint is the other route and saves you from building dedup. Whichever you choose, start with Content-Security-Policy-Report-Only on any new directive so the volume is visible before it matters. Keep in mind the endpoint itself needs basic rate limiting, since anyone can post junk to it.
