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 |
script-src https://cdn.jsdelivr.net | MixVisit fingerprint library (@mix-visit/lite) |
connect-src *.shieldlabs.ai | REST API, WebRTC, and ICE connections |
connect-src https://cdn.jsdelivr.net | MixVisit module fetch |
connect-src wss://*.shieldlabs.ai | WebSocket connections for WebRTC |
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 |
cdn.jsdelivr.net | MixVisit fingerprint library |
rest.shieldlabs.ai | REST fingerprint endpoint |
webrtc.shieldlabs.ai | WebRTC ICE session |
ice.shieldlabs.ai:3478 | STUN (UDP) |