Kotlin / kotlinx.html

Kotlin DSL for HTML
Apache License 2.0
1.61k stars 132 forks source link

Added nonce attribute to script and style tags for Content Security Policy #99

Closed jonare closed 5 years ago

jonare commented 5 years ago

Dynamic Content Security Policy (CSP)s are based on a random value - a nonce - supplied in the policy. This value must be repeated in all valid script and/or style tags as an attribute named "nonce". This PR adds these attributes.

https://www.w3.org/TR/CSP2/#script-src-the-nonce-attribute https://csp.withgoogle.com/docs/strict-csp.html

cy6erGn0m commented 5 years ago

Thanks!