Content Security Policy
If your application sets aContent-Security-Policy header, you must add ShieldLabs to the allowlists.
Required directives
| Directive | Required for |
|---|---|
script-src https://cdn.shieldlabs.ai | Loading the JS snippet |
connect-src *.shieldlabs.ai | REST API calls and WebRTC data channel |
connect-src wss://*.shieldlabs.ai | WebSocket connections for real-time checks |
connect-src blob: | WebRTC STUN/ICE (required for network fingerprinting) |
img-src https://rest.shieldlabs.ai | noscript beacon (optional, see below) |
Nginx example
Next.js example
noscript beacon
The noscript beacon requiresimg-src https://rest.shieldlabs.ai. See Advanced SDK for details.
What the SDK connects to
| Host | Purpose |
|---|---|
cdn.shieldlabs.ai | Snippet CDN |
rest.shieldlabs.ai | REST fingerprint endpoint |
api.shieldlabs.ai | Dashboard API |
wss://*.shieldlabs.ai | WebRTC/WebSocket channel |