slackhq / csp-html-webpack-plugin

A plugin which, when combined with HTMLWebpackPlugin, adds CSP tags to the HTML output.
MIT License
163 stars 39 forks source link

Allow nonceEnabled and hashEnabled to take single boolean values #101

Open StephanBijzitter opened 3 years ago

StephanBijzitter commented 3 years ago

Summary

Providing a single boolean value to either of these options will now apply the value to each provided policy directive.

Closes slackhq/csp-html-webpack-plugin#98

Requirements (place an x in each [ ])

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

StephanBijzitter commented 3 years ago

I haven't written any new tests as the existing tests already cover this functionality because of my change to the default values.

If wanted, I could add specific test-cases to handle the 4 shorthand values.