Skip to content

Commit

Permalink
Update Startup.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeWalker authored Nov 22, 2024
1 parent 97c9dbd commit 82ada0e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cpu-app/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ public void ConfigureServices(IServiceCollection services)

services.AddMemoryCache();

services.AddHttpLogging(logging =>
{
logging.CombineLogs = true;
});


// for security reasons, the following headers are set.
services.AddMvc(opts =>
{
Expand Down Expand Up @@ -140,8 +146,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddHealthChecks(checks =>
{
checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask<IHealthCheckResult>(HealthCheckResult.Healthy("Ok")));

});
});

services.AddSession(x =>
{
Expand Down Expand Up @@ -236,6 +241,8 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF
Secure = CookieSecurePolicy.Always,
MinimumSameSitePolicy = Microsoft.AspNetCore.Http.SameSiteMode.None
});

app.UseHttpLogging();
app.UseMvc(routes =>
{
routes.MapRoute(
Expand Down

0 comments on commit 82ada0e

Please sign in to comment.