Skip to main content

How to use Smartsupp with Content security policy (CSP)?

Learn to use Smartsupp with Content Security Policy (CSP) for secure content.

Written by Michal Jindra

If your website uses a Content Security Policy, allow Smartsupp's domains (*.smartsupp.com, *.smartsuppchat.com and *.smartsuppcdn.com) in it, otherwise the chat won't load correctly. The exact rules for CSP v3 and CSP v2 are below.

We've broken the article into a few sections:


CSP v3 - strict, compatible with Google

Content-Security-Policy:
object-src 'none';
script-src 'nonce-{random}' 'strict-dynamic' 'unsafe-inline' https: http:;
base-uri 'self';
report-uri https://your-report-collector.example.com/


CSP v2

Content-Security-Policy: 
    connect-src: 
        wss://*.smartsupp.com
        https://*.smartsupp.com 
        https://*.smartsuppchat.com
        https://*.smartsuppcdn.com
    font-src: 
        https://*.smartsuppcdn.com
    media-src: 
        https://*.smartsuppcdn.com
    img-src: 
        data: 
        https://*.smartsuppcdn.com
    script-src: 
        'unsafe-inline' 
        https://*.smartsuppchat.com 
        https://*.smartsuppcdn.com
    style-src: 
        'unsafe-inline' 
        https://*.smartsuppcdn.com


Changelog

Changelog 2020-04-17: Added following

connect-src:
      https://*.smartsuppchat.com
      https://*.smartsuppcdn.com

2020-09-22: Removed following

    connect-src: 
        https://smartsupp-widget-161959.c.cdn77.org
    font-src: 
        https://smartsupp-widget-161959.c.cdn77.org
    media-src: 
        https://smartsupp-widget-161959.c.cdn77.org
    img-src: 
        https://smartsupp-widget-161959.c.cdn77.org
    script-src: 
        https://smartsupp-widget-161959.c.cdn77.org
    style-src:
        https://smartsupp-widget-161959.c.cdn77.org


What's next?

💡 Need more help? Contact our support team via chat or email — we're happy to help.

Did this answer your question?