Skip to content

Design pillar: CSP nonce support + per-provider directive catalog #6

@productdevbook

Description

@productdevbook

Strict CSP breaks every competitor. We ship nonce-aware injection and a documented directive catalog per provider.

Evidence

Contract

  1. `load({ nonce: string })` applied to every `<script>` and injected `<style>` tag.
  2. `cspDirectives(provider)` helper that returns per-provider `Record<'script-src' | 'connect-src' | 'frame-src' | 'style-src' | 'img-src', string[]>` — merge-able into the app's policy.
  3. Documentation page `docs/csp.md` with exact directive set per provider including WSS endpoints (e.g. `wss://nexus-websocket-*.intercom.io`, `wss://client.relay.crisp.chat`, `wss://widget-mediator.zopim.com`, `wss:///cable`).
  4. Runtime dev-mode warning if we detect a CSP blocked message via `securitypolicyviolation` event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    competitor-analysisDerived from OSS competitor issue patternscspCSP, nonce, sandboxingdesign-pillarCore design decisions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions