https://cdn.helpalive.com to script-src and https://api.helpalive.com to connect-src. This page is for developers whose app sends a Content-Security-Policy header. It lists the sources HelpAlive needs, and how to keep a strict, nonce-based policy. Most apps don’t send one and can skip this page.
Prerequisites
- The HelpAlive tag is in your pages. See Install the script.
- You can change the policy your server or framework sends.
What to add
Add these sources to the policy you already have, without removing anything:
If your tag sets
data-chat-endpoint, add that address to connect-src too.
You don’t need a style-src change or 'unsafe-inline'.
If your policy has only default-src
If your policy has noscript-src or connect-src, its default-src applies. Add the sources to default-src instead. A new script-src or connect-src line would replace default-src and block your app’s own scripts or requests.
For example, default-src 'self'; becomes:
How to use a nonce
If your policy uses a nonce, put the page’s nonce on the HelpAlive tag, the same way your other scripts get theirs. Put it on the script that callsidentify() too, if that script is written into the page.
1
Render the nonce into the tag
Your server makes a fresh nonce for each response and puts it in the policy header. Print the same value into the tag’s
nonce attribute.2
Leave the rest to HelpAlive
HelpAlive reads the nonce from its own tag and puts it on every script it adds. With
'strict-dynamic', your policy allows those scripts even without the nonce.nonce attribute. There is no HelpAlive-specific nonce attribute.
With Google Tag Manager
If you load HelpAlive through Google Tag Manager, your policy must already allow Tag Manager’s Custom HTML tags. Add our sources as well.If your policy has no nonce
Without a nonce or'unsafe-inline', your policy blocks inline scripts, including an identify() call written into the page. Put the four queue lines and identify() in a .js file served from your own site, which 'self' allows. Code in your app’s own bundle already works this way.
In a server-rendered app, print the user’s details as a JSON data block. Then, in your .js file, read them from that block. HTML and server-rendered shows how.
Check it works
1
Open your app with the browser console open
Sign in, so that
identify() runs and the agent can load.2
Look for policy errors
A blocked request shows as a console error that names
Content Security Policy and one of our hosts. If there is no such error and the script loads, your policy allows HelpAlive.3
Confirm on the setup page
Load a page of your app, then come back to Settings → Setup & API Key. Step Add HelpAlive to your app shows that the script is on your pages. Once you sign in, it gets a check. Once the agent is switched on in Controls, the chat button appears in your app.
Why does the script never load?
script-src is missing https://cdn.helpalive.com, or your policy uses a nonce and the HelpAlive tag has none. If your policy has no script-src, its default-src applies, so add our sources there, as above. The browser console names the blocked script.
Why does the script fail with no policy error?
Your app’s service worker may be fetching our script. The worker’s requests follow the policy sent with the worker’s own file. In that policy,connect-src applies to them, not script-src. In Chrome, the console shows net::ERR_FAILED for helpalive.js, with no policy error.
Add our sources to connect-src in the policy your server sends with the worker file, including https://cdn.helpalive.com. An installed worker keeps its old policy until its file changes. Deploy a changed worker file, or unregister the worker in your browser’s developer tools while you test.
Why did my app’s own scripts stop working after I added the lines?
Your policy had onlydefault-src, and the new script-src line replaced it for scripts. The browser console says a script “violates the following Content Security Policy directive”. Remove the new lines and add our sources to default-src, as above.
Why does activity arrive, but the agent never appears?
Your tag setsdata-chat-endpoint, and connect-src doesn’t list that address. The agent’s settings can’t load, so its button never shows. Add the address to connect-src, or remove data-chat-endpoint from the tag.
What does report-only mode do?
AContent-Security-Policy-Report-Only header blocks nothing: it only reports. Fix what it reports before you switch it to enforcing.
Next
Install the script
The tag, identify() and reset().
Troubleshooting
When the agent doesn’t appear.
Security
Keys, verified users and sessions.

