Skip to content

Commit

Permalink
update blazor app
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod committed Feb 2, 2024
1 parent 1711554 commit 6630273
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions BlazorAuth0Bff/Server/SecurityHeadersDefinitions.cs
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
2 changes: 1 addition & 1 deletion MyApi/MyApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

## History

- 2024-02-02 Updated packages, fix refresh bug
- 2024-01-14 Updated packages, improve security headers in blazor app
- 2023-11-25 Updated .NET 8
- 2023-11-03 Updated packages, fixed security headers
Expand Down

0 comments on commit 6630273

Please sign in to comment.