CSP, iframes and security requirements
The Screeb tag is a third-party script that runs inside your page. If your site enforces a Content Security Policy, is served inside an iframe, or restricts browser permissions, you need to grant Screeb a small, explicit set of privileges.
This page lists exactly what the tag needs, what happens when a requirement is missing, and which features keep working anyway.
Screeb never requires 'unsafe-eval'. The tag contains no eval, no
new Function, and no WebAssembly, so a policy that forbids dynamic code
evaluation is fully supported.
Content Security Policyβ
The short versionβ
This policy runs every Screeb feature:
default-src 'self';
script-src 'self' https://*.screeb.app;
connect-src 'self' https://*.screeb.app wss://*.screeb.app https://*.s3.fr-par.scw.cloud;
style-src 'self' https://*.screeb.app;
img-src 'self' data: blob: https://*.screeb.app;
font-src 'self' https://*.screeb.app;
media-src 'self' blob: https://*.screeb.app;
frame-src 'self';
No Screeb origin appears in frame-src: the frames the tag creates carry no
src. Add your booking provider's origin there if you use booking questions.
That is the whole policy β no 'unsafe-inline' anywhere, for scripts or for
styles, provided you install the tag without an inline snippet. See
Installing without an inline script.
If you route Screeb through your own domain (see
Custom Collector URL), replace *.screeb.app with
your proxy hostname in every directive above.
Directives Screeb does not needβ
You can leave these as strict as you like:
| Directive | Why it is not needed |
|---|---|
'unsafe-eval' | No eval, no new Function, no WebAssembly. Browser capability detection is feature-based. |
script-src 'unsafe-inline' | Only the optional HTML snippet needs it. The attribute install below has no inline script; neither does the npm SDK. |
style-src-attr 'unsafe-inline' | The tag writes no style attribute. Everything it styles at runtime goes through CSSOM or its own stylesheet, neither of which CSP governs. |
worker-src | The tag starts no Web Worker, Shared Worker or Service Worker. |
object-src | No object, embed or applet elements. |
base-uri, form-action | The tag renders no form and never rewrites base. |
prefetch-src | The tag issues no prefetch or preload link. Older Screeb documentation asked for this; it is obsolete. |
font-src blob: | Fonts moved off blob URLs in tag 0.48.1 and are now loaded by URL through the Font Loading API. Also obsolete. |
Where Screeb loads fromβ
| Origin | Used for | Directives |
|---|---|---|
https://t.screeb.app | Loader tag.js, the versioned feature bundles (core.js, widget.js, editor.js, inspector.js), their stylesheets, webfonts, UI translations, notification sounds, recoloured emoji | script-src, style-src, font-src, connect-src |
https://rpc.screeb.app | REST API: survey configuration, identity, event capture, session-replay batches, upload authorisation | connect-src |
wss://centipede.screeb.app | Real-time channel carrying survey questions and answers | connect-src |
https://r.screeb.app | SDK error and health reporting | connect-src |
https://static.screeb.app | Images, audio and video attached to your questions, and reading back uploaded answer files | img-src, media-src |
https://emoji.screeb.app | Emoji glyphs (SVG) | img-src |
https://*.s3.fr-par.scw.cloud | Pre-signed upload of file, voice, video and screenshot answers | connect-src |
https://admin.screeb.app | postMessage peer for the survey builder only β never fetched from your page | none |
All Screeb origins are HTTPS/WSS only. The tag refuses any non-HTTPS custom
endpoint, so a policy containing upgrade-insecure-requests or
block-all-mixed-content changes nothing.
What each directive controlsβ
script-src β mandatoryβ
The loader and the feature bundles are ES modules served from the tag origin.
The bundles run inside frames the tag creates on your page; those frames have no
src, so they inherit your page's CSP β your script-src governs them too.
If missing: nothing loads. The tag reports the failure and every pending
$screeb() call rejects quickly instead of hanging. Your page is otherwise
unaffected.
connect-src β mandatoryβ
Covers the REST API, the report endpoint, the WebSocket channel, and fetches of the tag's own translations, sounds and stylesheet text.
wss: is a distinct scheme: connect-src https://*.screeb.app does not
authorise wss://centipede.screeb.app. List both.
If missing: see the matrix β the REST endpoint and the WebSocket have very different blast radii.
style-srcβ
Widget, editor and inspector CSS ship as real stylesheets from the tag origin.
The tag sets no style attribute anywhere β anything it styles at runtime
(recoloured emoji, widget geometry) is applied through CSSOM, which CSP does not
govern β so style-src-attr 'unsafe-inline' is never needed.
If missing: the tag degrades in three steps rather than rendering an unstyled panel in front of your users:
- A
stylesheetlink β the normal path. - Constructed stylesheets (
adoptedStyleSheets) β CSSOM, whichstyle-srcdoes not govern, so this works even understyle-src 'none'. Requires Chrome 73+, Firefox 101+, Safari 16.4+. - An inline
styleelement β for the opposite policy, one that allows'unsafe-inline'but not the Screeb origin.
Every fallback is logged as an error, because only you can fix the policy. If all three fail β an old browser under a policy that refuses both the origin and inline styles β no survey, in-app message or feedback button renders at all, while tracking and targeting keep working normally. This is the CSP mistake with the least visible symptoms; the health inspector ranks it first for that reason.