Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Security Policy (CSP) violations: 'data' blocked by 'font-src' directive #688

Open
Stuj1 opened this issue Oct 28, 2024 · 0 comments

Comments

@Stuj1
Copy link

Stuj1 commented Oct 28, 2024

Hello,

We are using clarity on our site that enforces a strict Content Security Policy (CSP).
We have added the *.clarity.ms domain to all the relevant directives (connect, script, font, image).

We continue to get a large amount of csp violations arising from Clarity, sometimes several hundred per session.

Example violation:

font-src: csp_violation: 'data' blocked by 'font-src' directive
font-src: 'data' blocked by 'font-src' directive of the policy ...
  at <anonymous> @ https://www.clarity.ms/s/0.7.49/clarity.js:2:19579

This looks like it is trying to load fonts using data, which is not outlined in the Clarity CSP docs. I'm hesitant to add 'data' to our CSP, as this could present some security risk, albeit a small one. At the least, I believe the docs should mention if this is a requirement.

Do you know why these violations would be occurring, in such high number? Do you have any advice on how to make it go away?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant