Using UniConsent with Content Security Policy

Content Security Policy (CSP) is a security mechanism that helps protect against content injection attacks, such as Cross-Site Scripting (XSS).

UniConsent fully supports Google strict CSPv3:

Content-Security-Policy: object-src 'none'; script-src 'nonce-{random}'
'unsafe-inline' 'unsafe-eval' 'strict-dynamic' https: http:; base-uri 'self';

If you are already serving this policy from your website, you don't need to apply any changes.

CSP up to version 1 or 2

Content-Security-Policy default-src 'self';
script-src 'self'; style-src 'self' 'unsafe-inline';

Be aware that you have to update the code on your website each time when you make changes at CMP.

Still have questions?

Contact us: