feat: added secure headers middleware
Signed-off-by: Jean Gatto <jean_gatto@hotmail.com>
This commit is contained in:
@@ -54,6 +54,7 @@
|
|||||||
<PackageVersion Include="MongoDB.Driver" Version="2.27.0" />
|
<PackageVersion Include="MongoDB.Driver" Version="2.27.0" />
|
||||||
<PackageVersion Include="NSubstitute" Version="5.1.0" />
|
<PackageVersion Include="NSubstitute" Version="5.1.0" />
|
||||||
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
|
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
|
||||||
|
<PackageVersion Include="OwaspHeaders.Core" Version="8.1.0" />
|
||||||
<PackageVersion Include="Polly" Version="8.4.1" />
|
<PackageVersion Include="Polly" Version="8.4.1" />
|
||||||
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.4" />
|
<PackageVersion Include="Roslynator.Analyzers" Version="4.12.4" />
|
||||||
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.4" />
|
<PackageVersion Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.4" />
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
### Register a new customer
|
### Register a new customer
|
||||||
|
|
||||||
POST http://localhost:56344/api/customers HTTP/1.1
|
POST http://localhost:56570/api/customers HTTP/1.1
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -13,5 +13,5 @@ content-type: application/json
|
|||||||
|
|
||||||
### Gets a list of all customers
|
### Gets a list of all customers
|
||||||
|
|
||||||
GET http://localhost:56344/api/customers HTTP/1.1
|
GET http://localhost:56570/api/customers HTTP/1.1
|
||||||
content-type: application/json
|
content-type: application/json
|
||||||
@@ -14,6 +14,7 @@ using Microsoft.AspNetCore.ResponseCompression;
|
|||||||
using Microsoft.AspNetCore.Routing;
|
using Microsoft.AspNetCore.Routing;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using OwaspHeaders.Core.Extensions;
|
||||||
using Shop.Application;
|
using Shop.Application;
|
||||||
using Shop.Core;
|
using Shop.Core;
|
||||||
using Shop.Core.Extensions;
|
using Shop.Core.Extensions;
|
||||||
@@ -116,6 +117,7 @@ app.UseSwagger();
|
|||||||
app.UseSwaggerUI();
|
app.UseSwaggerUI();
|
||||||
app.UseResponseCompression();
|
app.UseResponseCompression();
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
|
app.UseSecureHeadersMiddleware();
|
||||||
app.UseMiniProfiler();
|
app.UseMiniProfiler();
|
||||||
app.UseCorrelationId();
|
app.UseCorrelationId();
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" />
|
||||||
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" />
|
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" />
|
||||||
<PackageReference Include="MiniProfiler.EntityFrameworkCore" />
|
<PackageReference Include="MiniProfiler.EntityFrameworkCore" />
|
||||||
|
<PackageReference Include="OwaspHeaders.Core" />
|
||||||
<PackageReference Include="Roslynator.Analyzers">
|
<PackageReference Include="Roslynator.Analyzers">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
|||||||
Reference in New Issue
Block a user