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

gantt.config.csp = true could not working #135

Open
g243307885 opened this issue Dec 23, 2024 · 1 comment
Open

gantt.config.csp = true could not working #135

g243307885 opened this issue Dec 23, 2024 · 1 comment

Comments

@g243307885
Copy link

I have enabled Content Security Policy in my Angular project and set the value of gantt.config.csp to true, but it still prompts an error message

dhtmlxgantt.js:20 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'nonce-randomNonceGoesHere'". Either the 'unsafe-inline' keyword, a hash ('sha256-V2Nqg6DDKwrCjdMqvumaraU8t+T2Dax9wA2sBV/y9Tw='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.

@MaksimLakatkouXBPL
Copy link

Hello.
Currently, the gantt.config.csp configuration does not affect whether Gantt applies inline styles or not. Unfortunately, this can’t be changed at the moment.
To use Gantt in your project with the current CSP restrictions, you would need to configure your CSP policy to allow exceptions for Gantt.

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

2 participants