HttpSecurity.AspNet
1.0.0-preview.6
This is a prerelease version of HttpSecurity.AspNet.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package HttpSecurity.AspNet --version 1.0.0-preview.6
NuGet\Install-Package HttpSecurity.AspNet -Version 1.0.0-preview.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HttpSecurity.AspNet" Version="1.0.0-preview.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HttpSecurity.AspNet --version 1.0.0-preview.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HttpSecurity.AspNet, 1.0.0-preview.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install HttpSecurity.AspNet as a Cake Addin #addin nuget:?package=HttpSecurity.AspNet&version=1.0.0-preview.6&prerelease // Install HttpSecurity.AspNet as a Cake Tool #tool nuget:?package=HttpSecurity.AspNet&version=1.0.0-preview.6&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
HttpSecurity.AspNet
Table of Contents
About The Project
This package builds security policies for ASP.NET projects, including both Blazor Server and the server part of a Server Hosted Blazor WebAssembly project. We intend to build
and deploy a documentation website shortly. Until then fork this repo and see how the example Blazor Server project builds its security policies in
Program.cs
.
Getting Started
ASP.NET
- Add
builder.Services.AddHttpsSecurityHeaders()
in yourProgram.cs
file, specifying the options that you require. - Add
UseHttpSecurityHeaders();
withUseCompressedStaticFiles();
inStartup.Configure()
. By default CompressedStaticFiles is configured to allow slightly larger files for some image formats as they can store more pixels per byte, this can be disabled by callingCompressedStaticFileOptions.RemoveImageSubstitutionCostRatio()
.
Example
An example can be found in the Example directory.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.2)
- Microsoft.Extensions.Options (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.2.0 | 832 | 1/26/2024 | |
1.1.0 | 840 | 6/7/2023 | |
1.0.0 | 891 | 1/19/2023 | |
1.0.0-preview.6 | 442 | 11/3/2022 | |
1.0.0-preview.5 | 231 | 10/24/2022 | |
1.0.0-preview.4 | 385 | 10/1/2022 | |
1.0.0-preview.3 | 173 | 9/30/2022 | |
1.0.0-preview.2 | 202 | 9/29/2022 | |
1.0.0-preview.1 | 170 | 9/27/2022 |