2 ms·
> You used a framework that specifically uses CSS in JS and tried to use it as a server-side rendered website. No, I DONT want server side rendering. That's th
by LeonM 8y ago
> You used a framework that specifically uses CSS in JS and tried to use it as a server-side rendered website.
No, I DONT want server side rendering. That's the whole point. I want an application that renders client side, but without the dynamic CSS injection that breaks CSP.
The only current solution that is being offered [1] would be using server-side rendering to inject CSP nonces into your client-side rendered app... it's madness.
It should be possible to compile the CSS-in-JSS into a .css file and serve that css file statically.
[1] https://github.com/cssinjs/jss/blob/master/docs/csp.md https://github.com/cssinjs/jss/blob/master/docs/csp.md