Instant estimate
Security and privacy

Content Security Policy

CSP

A Content Security Policy is a header that tells the browser which sources a page may load scripts, styles, images and forms from, so injected code has nowhere to run.

It is one of the strongest protections against cross-site scripting: even if someone manages to inject a script, the browser refuses to run it unless it comes from an allowed source.Source 1 It can also limit where forms may send data.

A strict policy is easiest on a site with few third parties. Sites full of tag managers and widgets end up with long, leaky allow-lists.Source 2

How Regular approaches it

Regular's sites load almost everything from their own domain, which makes a tight policy simple. On Piggelinen, forms may only post to the one form service the school uses.

BenjaminWeb designer for sustainable and circular businesses

Sources and further reading

  1. Content Security Policy, MDN Web Docsdeveloper.mozilla.org
  2. Content Security Policy Cheat Sheet, OWASPcheatsheetseries.owasp.org

Planning a website?

Get a price range in a minute with the instant estimate, or book a 15-minute intro call. Regular builds fast, light websites for sustainable and circular businesses, in Astro or Framer, whichever fits your team.

Book a 15 min introInstant estimate

Instant estimate