Nucleus .Net Core CMS

TagHelpers.NonceTagHelper Class

Namespace: Nucleus.ViewFeatures.TagHelpers
Assembly: Nucleus.ViewFeatures.dll
Adds a nonce attribute to script, style, link, object, img, embed, and video tags. The nonce can be used by Content Security Policy (CSP) rules.
The default Content Security Policy (CSP) rules are generated by the SecurityHeadersMiddleware in the core, but users may choose to override the automatic rules by specifying their own CSP rules in config - so this class needs to add the nonce attribute to tags that *might* be controlled by a custom CSP, as well as ones that are used by the default CSP rules.
Provides access to view context.
ProcessAsync (TagHelperContext context, TagHelperOutput output)
Generate the output.