Skip to content

Integration Guides

Choose your platform to get started with CSP reporting.

Configure CSP headers directly on your web server:

  • Nginx - add_header directive
  • Apache - Header directive

Add CSP headers in your application code:

  • Node.js - Express, Koa, Fastify middleware
  • Next.js - Middleware and config headers

Configure headers on your hosting platform:

Add CSP to containerized applications:

  • Docker - Nginx, Traefik, Envoy configurations

All integrations follow the same pattern:

  1. Add the CSP header with your policy directives
  2. Include the report-uri pointing to Header Hawk
  3. Start in report-only mode to avoid breaking your site
  4. Review violations in the Header Hawk dashboard
  5. Tune your policy based on legitimate resources
  6. Switch to enforce mode when ready

All guides use this reporting endpoint:

https://ingest.headerhawk.com/csp/YOUR_SITE_ID

Replace YOUR_SITE_ID with the ID from your Header Hawk dashboard.