
For web developers defining permitted resources on a new page or tightening an existing site configuration.
Build a strict Content-Security-Policy from your allowed sources and receive one consistent directive ready for review and integration.
The sample allows a main domain as the default source, repeats that domain plus a delivery domain for scripts, and keeps a separate domain for connections. After building, check that the result area holds one coherent policy instead of several overlapping directives.
Input
https://example.com
https://example.com https://cdn.example.com
https://api.example.comOutput
default-src https://example.com; script-src https://example.com https://cdn.example.com; connect-src https://api.example.com; object-src 'none'; base-uri 'self'; frame-ancestors 'none'The policy is assembled inside your browser. The domains you type stay on your device, nothing is transmitted and no copy remains after you close the tab, which makes it practical to draft an internal configuration first.
The default source is the fallback for resource types you have not listed individually, while script sources only govern executable code. A domain allowed as a script source is therefore not automatically allowed for styles, images or connections.
A legitimate origin is usually missing: an external style sheet, a font, an embedded frame or an analytics service. List every resource the page actually calls, add the missing domains, rebuild the policy and publish it again.
The wording carries over easily, but each site pulls in its own resources. Treat the text as a starting point, then adjust the domains for each project so you do not block something the page depends on.