Skip to content

Commit e171860

Browse files
committed
code clean up
1 parent d58b2f2 commit e171860

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
var services = builder.Services;
1111
var configuration = builder.Configuration;
12-
var env = builder.Environment;
1312

1413
services.AddSecurityHeaderPolicies()
1514
.SetPolicySelector((PolicySelectorContext ctx) =>
1615
{
17-
return SecurityHeadersDefinitions.GetHeaderPolicyCollection(env.IsDevelopment(),
18-
configuration["MicrosoftEntraID:Instance"]);
16+
return SecurityHeadersDefinitions.GetHeaderPolicyCollection(
17+
builder.Environment.IsDevelopment(),
18+
configuration["MicrosoftEntraID:Instance"]);
1919
});
2020

2121
services.AddScoped<MsGraphService>();
@@ -63,7 +63,7 @@
6363

6464
var app = builder.Build();
6565

66-
if (env.IsDevelopment())
66+
if (app.Environment.IsDevelopment())
6767
{
6868
IdentityModelEventSource.ShowPII = true;
6969

0 commit comments

Comments
 (0)