question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Content Security Policy console errors

See original GitHub issue

Hi,

I’m facing an issue using nouislider with CSP enabled on my server:

Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'".

addMarking @ nouislider.js:1229 pips @ nouislider.js:1247 closure @ nouislider.js:2114 initialize @ nouislider.js:2135

Basically this happens because the html markup is created in a huge string with inline styles and as soon as you do element.innerHTML = out;

function addMarking ( spread, filterFunc, formatter ) { ... element.innerHTML = out; return element; }

Then the CSP complains about inline style. (UPDATED) this only happens if I enable pips, the normal slide behavior is CSP compliant.

Are you guys aware of this?

ps. Thanks for the great plugin!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
leongersencommented, May 3, 2017

This only happens here. Shouldn’t be too hard to fix.

0reactions
github-actions[bot]commented, May 31, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSP errors and warnings (Content Security Policy) - HTTP
When you see any of the following messages logged in the browser devtools console, it indicates that a problem related to CSP has...
Read more >
Chrome console error: The Content Security Policy was ...
A Content Security Policy or CSP is a header your server can set which tells the browser to enforce a whitelist of what...
Read more >
How to fix 'because it violates the following content security ...
'because it violates the following content security policy directive' is a browser error message that occurs when Content Security Policy is blocking a ......
Read more >
Fix a content security policy (CSP) error - Affilimate
How to check for content security policy errors. Visit your website, open Chrome Dev Tools, click the Console tab, and check for any...
Read more >
Why don't all browser console CSP errors need to be fixed?
Browser console errors: why don't all CSP errors in browser console need to be fixed? Content Security Policy backward compatibility mode.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found