Commit 438d023
fix(audience): set demo CSP to dev and sandbox audience API only
Locks the demo's Content-Security-Policy to the minimum needed to
run — audience API endpoints only, nothing else.
- default-src 'self'
- script-src 'self' (no inline scripts, no eval)
- style-src 'self' (no inline styles)
- connect-src limited to https://api.dev.immutable.com and
https://api.sandbox.immutable.com
Explicitly NOT in connect-src: api.immutable.com. The @imtbl/metrics
SDK bundled into the CDN posts its own telemetry there, and those
calls will be blocked by the browser with a CSP violation log. That
is intentional — the demo is a harness, not a product, and the metrics
bundle travelling along with the audience SDK shouldn't phone home
from a localhost demo page. The violations do not affect demo
behaviour; the audience calls still succeed.
README's Security section explains this so the CSP violation lines
in the console aren't mistaken for a bug.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 09c51de commit 438d023
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
0 commit comments