Generate CSP

Our CSP is served through a Cloudflare headers policy. Updating that policy is fairly simple but generating the right CSP can be tricky. This file helps you do just that.

Usage

  1. Update ./scripts/generate-csp/index.js with your new entries
  2. Run node scripts/generate-csp and copy the output
  3. Update kualibuild/identity in src/shared/secure/index.js around line 61
  4. Update the production-security-headers custom policy in AWS at Cloudfront > Policies > Response headers