Overview
Navi uses HTTPS APIs, optional WebSocket connections (via providers), and microphone access for voice. Configure CSP to allow required domains.Core directives
Replace the CDN origin as needed if you self-host.connect-srcincludes Navi APIs and common provider endpoints (ElevenLabs, Vapi). Add any additional domains your configuration uses.wss:is included for provider real-time connections.img-srcallows Unsplash if you use the default backgrounds.style-src 'unsafe-inline'may be required by your app and third-party components. If you disallow it, ensure all inline styles are removed.
Permissions-Policy
Allow microphone for voice:NPM vs CDN
- NPM package: keep
script-srcto your own origin(s) ('self') unless you load other third-party scripts. - CDN: add your CDN host to
script-srcandstyle-srcas shown above, or self-host the built files to keep'self'only.
Debugging CSP
- Check your browser devtools console for CSP violations.
- Incrementally tighten directives once everything works.
