Skip to content

Commit

Permalink
Update SecurityHeadersDefinitions.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod authored Feb 2, 2024
1 parent 93e17b6 commit 9db980d
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev, strin
// due to Blazor
builder.AddScriptSrc()
// .Self() Add this if you want to use the visual studio debugging tools
.WithNonce()
.UnsafeEval();
.WithHash256("sha256-wTSw2ZoYOVpX8Sl5cEiYcCF8ddvCbjJhiX+oYQqD1s4=")
.WithNonce()
.UnsafeEval() // due to Blazor WASM
.StrictDynamic()
.UnsafeInline(); // only a fallback for older browsers when the nonce is used
})
.RemoveServerHeader()
.AddPermissionsPolicy(builder =>
Expand Down

0 comments on commit 9db980d

Please sign in to comment.