You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use Content Security Policy Level 2 on my website. This requires me to add a 'nonce' attribute to all <style> tags.
I'm currently using this plugin to inline some css and of course it does not produce a nonce-attribute which causes the generated <style> tag to fail.
What I would love to see is one of the following options:
A nonce configuration option in the plugin that I can set to any value and which is then rendered as a "nonce"-attribute on the generated style tag. I would probably use it to inject a dummy value which I would then replace server side, but in other setups this might be different. OR:
An option to omit the <style> tag itself and replace the token only with the css content. This would allow me to move the <style> tag with the nonce attribute to the HTML template directly. OR:
An option to specify a function as the 'target' which would receive the HTML and the CSS declarations as parameters and would return the rendered result, allowing for custom replacement logic.
Any of these would help a lot in this and similar scenarios. Please let me know what you think and if you have a preference for any option.
The text was updated successfully, but these errors were encountered:
I want to use Content Security Policy Level 2 on my website. This requires me to add a 'nonce' attribute to all <style> tags.
I'm currently using this plugin to inline some css and of course it does not produce a nonce-attribute which causes the generated <style> tag to fail.
What I would love to see is one of the following options:
Any of these would help a lot in this and similar scenarios. Please let me know what you think and if you have a preference for any option.
The text was updated successfully, but these errors were encountered: