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.

Is it possible to disable unsafe inline style in ApexCharts ?

See original GitHub issue

Hei,

We use ApexCharts with Content Security Policy, and it seems that the option style-src 'self' 'unsafe-inline'.

If not the following error happens and the charts layouts are broken.

Refused to apply inline style because it violates the following Content Security Policy directive

Is it possible to use ApexCharts without unsafe inline styles ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
blueeDevelopercommented, Sep 29, 2021

@junedchhipa - I am getting below error on my console. i have the latest version of apexcharts.

Refused to apply inline style because it violates the following Content Security Policy directive: “default-src ‘self’ *.apple.com”. Either the ‘unsafe-inline’ keyword, a hash (‘sha256-We76yQ6BbUqy3OL7pB4AiChSOtAH/BdDsZ0Z+MzXvD0=’), or a nonce (‘nonce-…’) is required to enable inline execution. Note also that ‘style-src’ was not explicitly set, so ‘default-src’ is used as a fallback.

Is there a way to get rid of this error. Due to this error, the styling of the stacked bar chart is a little messed up.

1reaction
junedchhipacommented, Oct 1, 2019

Sure. A Pull Request is always welcome.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refused to apply inline style because it violates the following ...
I have to downvote this because, as sowbug says, allowing unsafe-inline is bad for security. "If an attacker can inject a script tag...
Read more >
stroke - ApexCharts.js
Creates dashes in borders of svg path. Higher number creates more space between dashes in the border. ApexCharts <></noscript><img style= Notifications.
Read more >
How to prevent the use of unsafe-inline in CSP - Barry van Veen
Luckily, there are still ways to use inline scripts and styles on a page. We just have to "convert" them van unsafe to...
Read more >
apexcharts onclick get value | The AI Search Engine You Control
I have this ApexChart component. I make a dispatch to change the data and i can't achieve to update the component when data...
Read more >
apexcharts datauri Code Example - Code Grepper
javascript apexcharts to base 64 image ... apexcharts dataURI style ... 'unsafe-inline' react · 'useHistory' is not exported from 'react-router-dom'.
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