Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update security headers #19

Merged
merged 1 commit into from
Mar 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AspNetCoreRazor/AspNetCoreRazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.5" NoWarn="NU1605" />
<PackageReference Include="Microsoft.Identity.Web" Version="1.25.0" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.25.0" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" Version="0.16.1" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders.TagHelpers" Version="0.16.1" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" Version="0.18.0" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders.TagHelpers" Version="0.18.0" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions AspNetCoreRazor/SecurityHeadersDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev)
policy.AddStrictTransportSecurityMaxAgeIncludeSubDomains(maxAgeInSeconds: 60 * 60 * 24 * 365);
}

policy.ApplyDocumentHeadersToAllResponses();

return policy;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.5" NoWarn="NU1605" />
<PackageReference Include="Microsoft.Identity.Web" Version="1.25.0" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.25.0" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" Version="0.16.1" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders.TagHelpers" Version="0.16.1" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" Version="0.18.0" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders.TagHelpers" Version="0.18.0" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions AspNetCoreRazorMultiClients/SecurityHeadersDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev)
policy.AddStrictTransportSecurityMaxAgeIncludeSubDomains(maxAgeInSeconds: 60 * 60 * 24 * 365);
}

policy.ApplyDocumentHeadersToAllResponses();

return policy;
}
}
2 changes: 1 addition & 1 deletion BlazorBffAzureAD/Server/BlazorHosted.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageReference Include="Microsoft.Identity.Web.MicrosoftGraph" Version="1.24.1" />
<PackageReference Include="Microsoft.Identity.Web" Version="1.24.1" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.24.1" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" Version="0.16.1" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" Version="0.18.0" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions BlazorBffAzureAD/Server/SecurityHeadersDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev, strin
policy.AddStrictTransportSecurityMaxAgeIncludeSubDomains(maxAgeInSeconds: 60 * 60 * 24 * 365);
}

policy.ApplyDocumentHeadersToAllResponses();

return policy;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<PackageReference Include="Microsoft.Identity.Web.MicrosoftGraphBeta" Version="1.25.0" />
<PackageReference Include="Microsoft.Identity.Web" Version="1.25.0" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.25.0" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" Version="0.16.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.3.1" />
<PackageReference Include="NetEscapades.AspNetCore.SecurityHeaders" Version="0.18.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.5.0" />
</ItemGroup>

</Project>
2 changes: 2 additions & 0 deletions BlazorBffAzureADWithApi/Server/SecurityHeadersDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev, strin
policy.AddStrictTransportSecurityMaxAgeIncludeSubDomains(maxAgeInSeconds: 60 * 60 * 24 * 365);
}

policy.ApplyDocumentHeadersToAllResponses();

return policy;
}
}