Exemple #1
0
 public override void Process(TagHelperContext context, TagHelperOutput output)
 {
     if (AddNonce)
     {
         output.Attributes.Add("nonce", NonceService.GetNonce());
     }
     base.Process(context, output);
 }
Exemple #2
0
 public override void Process(TagHelperContext context, TagHelperOutput output)
 {
     if (AddNonce)
     {
         // The nonce service is created per request, so we
         // get the same nonce here as the CSP header
         output.Attributes.Add("nonce", _nonceService.GetNonce());
     }
 }