We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b3417b1 + 3474d8c commit 946fe95Copy full SHA for 946fe95
ej2-asp-core-mvc/common/EJ2_ASP.NETCORE/content-security-policy.md
@@ -29,9 +29,8 @@ using System.Security.Cryptography;
29
...
30
app.Use(async (context, next) =>
31
{
32
- RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
33
byte[] nonceBytes = new byte[32];
34
- rng.GetBytes(nonceBytes);
+ RandomNumberGenerator.Fill(nonceBytes);
35
string nonceValue = Convert.ToBase64String(nonceBytes);
36
context.Items.Add("ScriptNonce", nonceValue);
37
context.Response.Headers.Add("Content-Security-Policy", string.Format(
0 commit comments