Configure CSP and intake endpoints
For SDK 2.3.2, add these origins to your existing Content Security Policy directives:
script-src 'self' https://cdn.siteqwality.com;connect-src 'self' https://in.siteqwality.com https://in-replay.siteqwality.com https://cdn.siteqwality.com;Merge this fragment into your policy rather than replacing it. Authorize the inline install snippet with your nonce or a matching hash, or put the bootstrap in an allowed external script: a host allowlist does not authorize inline scripts. The CDN belongs in both directives.
What each host is for
Section titled “What each host is for”| Host | Directive | Used for |
|---|---|---|
https://cdn.siteqwality.com | script-src, connect-src | The SDK core and its lazy chunks; the config at /rum/ |
https://in.siteqwality.com | connect-src | Event batches (POST /) and identity checks (/v2/) |
https://in-replay.siteqwality.com | connect-src | Replay segments (POST /) |
First-party proxies
Section titled “First-party proxies”Set ingestBase, replayBase and configBase to your proxy’s host bases. Forward:
- Event
POST /v2/batchtoin.siteqwality.com. Forward identity checks too: SDK 2.3.2 sendsGET /v2/identity?h=<hash>, and the intake also acceptsPOST /v2/identitywith a JSON body. Preserve Authorization, Content-Type, the body and the private/no-store response; suppress identity query strings in proxy access logs. - Config
GET /rum/config/v2/<applicationId>.jsontocdn.siteqwality.com, without adding a token. - Replay
POST /v2/segmentstoin-replay.siteqwality.com, preservingAuthorization,Content-Type,Originandx-sq-replay-index, and the original gzip or JSON body.
For the fixed-URL replay transport, the index is a query-string-encoded header value, not URL parameters. Keep Authorization: Bearer <clientToken> in its header; never move tokens to query strings, path components or access logs. Preserve the response status and Retry-After, and do not turn an intake refusal into a success response.
A cross-origin replay proxy or intake must answer preflight with POST allowed and authorization, content-type, x-sq-replay-index allowed as request headers, and expose Retry-After to the browser. The intended preflight cache lifetime is 7,200 seconds; browsers may impose a lower cap.
Verify the replay preflight
Section titled “Verify the replay preflight”curl -i -X OPTIONS https://in-replay.siteqwality.com/v2/segments \ -H 'Origin: https://YOUR_SITE.example' \ -H 'Access-Control-Request-Method: POST' \ -H 'Access-Control-Request-Headers: authorization,content-type,x-sq-replay-index'Check the response permits all three headers and your origin. This proves only the preflight. In the browser, verify that the config GET succeeds and that the event and replay POSTs reach the correct hosts without CSP or CORS errors. A replay 403 can mean replay is not enabled for your application, an origin is refused or the token is invalid.