Skip to content

Commit

Permalink
code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod committed Nov 15, 2024
1 parent 2177dd3 commit 523acf7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DeviceFlowWeb/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@

var services = builder.Services;
var configuration = builder.Configuration;
var env = builder.Environment;

services.AddSecurityHeaderPolicies()
.SetPolicySelector((PolicySelectorContext ctx) =>
{
return SecurityHeadersDefinitions
.GetHeaderPolicyCollection(env.IsDevelopment());
.GetHeaderPolicyCollection(builder.Environment.IsDevelopment());
});

services.AddScoped<DeviceFlowService>();
Expand Down Expand Up @@ -50,7 +49,7 @@

app.UseSecurityHeaders();

if (env.IsDevelopment())
if (app.Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
Expand Down

0 comments on commit 523acf7

Please sign in to comment.