We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2177dd3 commit 523acf7Copy full SHA for 523acf7
DeviceFlowWeb/Program.cs
@@ -6,13 +6,12 @@
6
7
var services = builder.Services;
8
var configuration = builder.Configuration;
9
-var env = builder.Environment;
10
11
services.AddSecurityHeaderPolicies()
12
.SetPolicySelector((PolicySelectorContext ctx) =>
13
{
14
return SecurityHeadersDefinitions
15
- .GetHeaderPolicyCollection(env.IsDevelopment());
+ .GetHeaderPolicyCollection(builder.Environment.IsDevelopment());
16
});
17
18
services.AddScoped<DeviceFlowService>();
@@ -50,7 +49,7 @@
50
49
51
app.UseSecurityHeaders();
52
53
-if (env.IsDevelopment())
+if (app.Environment.IsDevelopment())
54
55
app.UseDeveloperExceptionPage();
56
}
0 commit comments