If your website sends a Content-Security-Policy header (or a <meta http-equiv="Content-Security-Policy"> tag), the browser will block the Raffle widget unless the policy allows it. Add the four entries below.
Content-Security-Policy
<meta http-equiv="Content-Security-Policy">
script-src https://cdn.raffle.ai; style-src https://cdn.raffle.ai; connect-src https://searchcfg.raffle.ai https://search-backend.raffle.ai; img-src data:;
Add them to your existing directives — do not replace them. If your policy has no script-src (or style-src, or connect-src) of its own, the browser falls back to default-src, so add https://cdn.raffle.ai there instead.
script-src
style-src
connect-src
default-src
https://cdn.raffle.ai
script-src https://cdn.raffle.ai
style-src https://cdn.raffle.ai
connect-src https://searchcfg.raffle.ai
connect-src https://search-backend.raffle.ai
img-src data:
Raffle needs no unsafe-inline, unsafe-eval, font-src, worker-src or frame-src entry of its own.
unsafe-inline
unsafe-eval
font-src
worker-src
frame-src
Search results can show a thumbnail from the indexed page. Those images are served from your own site or from https://rafflekbmedia.raffle.ai, so if your img-src is restrictive, add the hosts your content uses:
https://rafflekbmedia.raffle.ai
img-src
img-src 'self' data: https://rafflekbmedia.raffle.ai;
The install snippet in Script wraps the tag in an inline <script> block, which a strict policy refuses. Use the plain tag instead — it behaves identically:
<script>
<script id="raffle-sdk" defer data-uid="tool_id" src="https://cdn.raffle.ai/search/index.js"></script>
Put your nonce on the Raffle tag and keep 'strict-dynamic' in your script-src:
'strict-dynamic'
script-src 'nonce-YOUR_NONCE' 'strict-dynamic';
<script id="raffle-sdk" defer nonce="YOUR_NONCE" data-uid="tool_id" src="https://cdn.raffle.ai/search/index.js"></script>
A nonce without 'strict-dynamic' is not enough: the widget loads its application in a second request, which carries no nonce. In that case allow https://cdn.raffle.ai in script-src as well.
style-src and connect-src always need the hosts above, nonce or not.
Open a page with the widget on it, then the browser console. Blocked resources are reported as “Refused to load…” or "…violates the following Content Security Policy directive", and the message names the directive to fix.
You may also see up to three violation reports that Raffle is aware of and that do not stop the widget working: one inline script (a Firefox animation workaround), one empty inline style, and one eval check made by a validation library that falls back safely when it is refused. Allowing them is not necessary.
eval
A CSP applies to the document that sent it. If Raffle is installed inside an <iframe> you control, the policy of that document is the one that matters.
<iframe>
Still stuck? Send the policy your site sends, plus the console messages, to Raffle Support.