Page 1 of 1

CSP violation using Angular Viewer when report contain graphics

Posted: Mon Aug 26, 2024 5:15 pm
by victorscapin
Hello,

I'm using Stimulsoft Viewer for Angular, and i'm having issues when the report contains graphics due to CSP rules.
My CSP rule is a simple script-src 'self'.

Graphic not showing data:
report without unsafe-inline.png
report without unsafe-inline.png (62.83 KiB) Viewed 8746 times
Console Error:
csp violation.png
csp violation.png (41.75 KiB) Viewed 8746 times

When i add 'unsafe-inline', it's fine:
report with unsafe-inline.png
report with unsafe-inline.png (77.52 KiB) Viewed 8746 times


It's not a good practice to allow unsafe-inline in any html application. Is there a workaround or a fix to this issue?

Thanks

Re: CSP violation using Angular Viewer when report contain graphics

Posted: Tue Aug 27, 2024 1:10 pm
by Vadim
Hello

From version 2024.4.1 you can use 'nonce-stichartanimation' to allow chart animation script

Re: CSP violation using Angular Viewer when report contain graphics

Posted: Wed Aug 28, 2024 2:26 pm
by victorscapin
Hi Vadim

I will try that on next release. Thanks

Re: CSP violation using Angular Viewer when report contain graphics

Posted: Thu Aug 29, 2024 4:50 pm
by Lech Kulikowski
Hello,

You are welcome.