Is it possible to disable unsafe inline style in ApexCharts ?
See original GitHub issueHei,
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:
- Created 4 years ago
- Comments:13 (12 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.
Sure. A Pull Request is always welcome.