Required directives
Merge these with your existing CSP values.Optional: file attachments
Optional: voice input
Directive reference
script-src
| Value | Reason |
|---|---|
https://platform.typewise.app | Hosts the SDK bundle (sdk.js) |
'unsafe-inline' | Installation snippet sets window.twConfig inline |
connect-src
| Value | Reason |
|---|---|
https://platform-api.typewise.app | API calls |
https://*.ably.net wss://*.ably.net | Real-time messaging |
https://*.ably-realtime.com wss://*.ably-realtime.com | Real-time messaging failover |
https://*.s3.eu-central-1.amazonaws.com | File uploads (if attachments enabled) |
wss://api.elevenlabs.io | Voice input (if voice enabled) |
style-src
| Value | Reason |
|---|---|
'unsafe-inline' | The widget injects styles at runtime. Nonces aren’t supported. Not optional. |
img-src
| Value | Reason |
|---|---|
https://platform-uploads.typewise.app | Widget logo and bubble icon |
data: | Inline UI icons bundled in the SDK |
Verify your CSP
Look for CSP errors
Errors start with
Refused to load or Refused to connect and name the blocked domain and directive.Troubleshooting
| Symptom | Check |
|---|---|
| Widget doesn’t appear | script-src missing https://platform.typewise.app |
| Messages don’t send or arrive | connect-src missing https://platform-api.typewise.app or Ably domains |
| Widget unstyled or broken layout | style-src missing 'unsafe-inline' |
| File uploads fail | connect-src missing https://*.s3.eu-central-1.amazonaws.com |
| Real-time messages intermittent | connect-src missing *.ably-realtime.com failover domains |