Skip to content

Commit 523acf7

Browse files
committed
code clean up
1 parent 2177dd3 commit 523acf7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

DeviceFlowWeb/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66

77
var services = builder.Services;
88
var configuration = builder.Configuration;
9-
var env = builder.Environment;
109

1110
services.AddSecurityHeaderPolicies()
1211
.SetPolicySelector((PolicySelectorContext ctx) =>
1312
{
1413
return SecurityHeadersDefinitions
15-
.GetHeaderPolicyCollection(env.IsDevelopment());
14+
.GetHeaderPolicyCollection(builder.Environment.IsDevelopment());
1615
});
1716

1817
services.AddScoped<DeviceFlowService>();
@@ -50,7 +49,7 @@
5049

5150
app.UseSecurityHeaders();
5251

53-
if (env.IsDevelopment())
52+
if (app.Environment.IsDevelopment())
5453
{
5554
app.UseDeveloperExceptionPage();
5655
}

0 commit comments

Comments
 (0)