Hi
I’m getting unsafe-eval CSP error from script-src policy.
Can this be fixed somehow without adding unsafe-eval to the policy?
Do you have any other script version without eval inside your JS code?
Attaching screenshots.


Regards
Hi
I’m getting unsafe-eval CSP error from script-src policy.
Can this be fixed somehow without adding unsafe-eval to the policy?
Do you have any other script version without eval inside your JS code?
Attaching screenshots.
Regards
Hey Matt, Shaq here from the Support Engineering team😀
Intercom scripts may trigger Content-Security-Policy (CSP) warnings due to the use of the eval
function, which is generally not recommended as it can increase the risk of XSS attacks. However, Intercom supports Google strict CSPv3, which includes directives that can help mitigate these risks without enabling unsafe-eval
.
If you are using a strict CSP, you can include nonce-source(s) for scripts loaded by the Messenger, which allows you to maintain security without enabling unsafe-eval
. Despite these warnings, the functionality of Intercom should not be affected if the CSP is configured correctly. This guide her has a little more context as well: https://www.intercom.com/help/en/articles/3894-using-intercom-with-content-security-policy
Let me know if I can clarify anything!
Hey Shaq, thanks for the answer.
Can you please give me an example of how to include nonce for script loaded by Messenger?
We’re already adding nonce to intercom script, what else can I do?
If you are using a strict CSP, you can include nonce-source(s) for scripts loaded by the Messenger, which allows you to maintain security without enabling unsafe-eval
. Despite these warnings, the functionality of Intercom should not be affected if the CSP is configured correctly.
Also, what warnings here we’re talking about?
Despite these warnings, the functionality of Intercom should not be affected if the CSP is configured correctly.
Thanks
Matt
I don't think it's right to have to modify all other parts of our code just to accommodate Intercom.
This seems like a negative side effect caused by Intercom prioritizing its own service,
and I believe Intercom should address this issue promptly in a future version.
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.