Using Ionic Angular with strict CSP settings

Hi all,

I’m currently struggling with CSP settings. According to the documentation, “unsafe-inline” shall be enabled for style-src. However, this is considered as dangerous by many companies or authorities.

For the Angular part, I was able to solve this and use nonce. However, this does not work for the Ionic styles.

How does Ionic add the styles to the DOM, and is it possible to patch this to use a nonce?

Thanks in advance

1 Like