I'm using node.js, and I would like to set a CSP for certain things, such as JavaScript and CSS. I could use nonces and hashes, but how would I allow an HTML attribute, such as:
<div style="color:blue;" onclick="myFunction()"></div>
Since both of these are either CSS or JavaScript, my CSP blocks them. What can I do? I don't want to implement unsafe-inline
.