Skip to content

Commit 916c9c8

Browse files
authored
Merge pull request #35 from damienbod/dev
Fix security headers, use on app requests including API calls
2 parents 8bee42c + f7e0ed9 commit 916c9c8

File tree

7 files changed

+18
-12
lines changed

7 files changed

+18
-12
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
[Readme](https://github.com/damienbod/Blazor.BFF.AzureB2C.Template/blob/main/README.md)
44

5+
**2023-03-12** 2.0.2
6+
- Fix security headers, use on app requests including API calls
7+
- Updated packages
8+
59
**2023-01-15** 2.0.1
610
- Updated packages
711
- Improved Microsoft Graph client

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ nuget pack content/Blazor.BFF.AzureB2C.Template.nuspec
198198
Locally built nupkg:
199199

200200
```
201-
dotnet new -i Blazor.BFF.AzureB2C.Template.2.0.1.nupkg
201+
dotnet new -i Blazor.BFF.AzureB2C.Template.2.0.2.nupkg
202202
```
203203

204204
Local folder:

content/Blazor.BFF.AzureB2C.Template.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
33
<metadata>
44
<id>Blazor.BFF.AzureB2C.Template</id>
5-
<version>2.0.1</version>
5+
<version>2.0.2</version>
66
<title>Blazor.BFF.AzureB2C.Template</title>
77
<license type="file">LICENSE</license>
88
<description>Blazor BFF template for WASM ASP.NET Core hosted</description>
@@ -15,7 +15,7 @@
1515
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1616
<copyright>2023 damienbod</copyright>
1717
<summary>This template provides a simple Blazor template with BFF server authentication WASM hosted</summary>
18-
<releaseNotes>Updated to .NET 7, Improved MS Graph client</releaseNotes>
18+
<releaseNotes>Updated to .NET 7, updated security headers</releaseNotes>
1919
<repository type="git" url="https://github.com/damienbod/Blazor.BFF.AzureB2C.Template" />
2020
<packageTypes>
2121
<packageType name="Template" />

content/BlazorBffAzureB2C/Client/BlazorBffAzureB2C.Client.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.2" />
12-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.2" PrivateAssets="all" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.3" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.3" PrivateAssets="all" />
1313
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
14-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="7.0.2" />
14+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="7.0.3" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

content/BlazorBffAzureB2C/Server/BlazorBffAzureB2C.Server.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
</ItemGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.2" />
16-
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="7.0.2" NoWarn="NU1605" />
17-
<PackageReference Include="Microsoft.Identity.Web" Version="1.25.10" />
18-
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.25.10" />
19-
<PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="1.25.10" />
15+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.3" />
16+
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="7.0.3" NoWarn="NU1605" />
17+
<PackageReference Include="Microsoft.Identity.Web" Version="2.5.0" />
18+
<PackageReference Include="Microsoft.Identity.Web.UI" Version="2.5.0" />
19+
<PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="2.5.0" />
2020
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" Version="0.18.0" />
2121
</ItemGroup>
2222

content/BlazorBffAzureB2C/Server/SecurityHeadersDefinitions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev, strin
6464
policy.AddStrictTransportSecurityMaxAgeIncludeSubDomains(maxAgeInSeconds: 60 * 60 * 24 * 365);
6565
}
6666

67+
policy.ApplyDocumentHeadersToAllResponses();
68+
6769
return policy;
6870
}
6971
}

content/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 damienbod
3+
Copyright (c) 2023 damienbod
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)