|
|
|
|
|
by the8472
720 days ago
|
|
The point of CSP is to lock down your site so that any content (buggy or malicious) can't do damage. This requires templating engines to separate styles, scripts and event handlers from the html. > These are security considerations for all server rendered pages. That's not true. With the right CSP and sandbox rules content can be made inert without sanitizing. Sanitizing is still a good idea of course, but a rendering engine that is designed with CSP in mind will provide more layers of defense. |
|
The server can, at best, set the correct CSP header. It’s a validation performed entirely in the browser. Even the best intended rendering from the server can’t prevent CSP violation attempts when the client is executing some kind of script. That’s why even frameworks like Vue and React need a correctly configured CSP.