File tree Expand file tree Collapse file tree 4 files changed +5
-15
lines changed Expand file tree Collapse file tree 4 files changed +5
-15
lines changed Original file line number Diff line number Diff line change 2323 <PackageReference Include =" OpenIddict.EntityFrameworkCore" Version =" 5.8.0" />
2424 <PackageReference Include =" OpenIddict.Quartz" Version =" 5.8.0" />
2525 <PackageReference Include =" Quartz.Extensions.Hosting" Version =" 3.13.0" />
26-
27- <PackageReference Include =" Serilog" Version =" 4.0.2" />
2826 <PackageReference Include =" Serilog.AspNetCore" Version =" 8.0.3" />
29- <PackageReference Include =" Serilog.Extensions.Logging" Version =" 8.0.0" />
30- <PackageReference Include =" Serilog.Settings.Configuration" Version =" 8.0.4" />
31- <PackageReference Include =" Serilog.Sinks.Console" Version =" 6.0.0" />
32- <PackageReference Include =" Serilog.Sinks.File" Version =" 6.0.0" />
33- <PackageReference Include =" Serilog.Sinks.Seq" Version =" 8.0.0" />
3427 <PackageReference Include =" Swashbuckle.AspNetCore" Version =" 6.9.0" />
3528 </ItemGroup >
3629
Original file line number Diff line number Diff line change @@ -13,13 +13,11 @@ namespace OpeniddictServer;
1313
1414internal static class StartupExtensions
1515{
16- private static IWebHostEnvironment _env ;
1716 public static WebApplication ConfigureServices ( this WebApplicationBuilder builder )
1817 {
1918 var services = builder . Services ;
2019 var configuration = builder . Configuration ;
21- _env = builder . Environment ;
22-
20+
2321 services . AddControllersWithViews ( ) ;
2422 services . AddRazorPages ( ) ;
2523
@@ -161,7 +159,7 @@ public static WebApplication ConfigurePipeline(this WebApplication app)
161159
162160 app . UseSerilogRequestLogging ( ) ;
163161
164- if ( _env ! . IsDevelopment ( ) )
162+ if ( app . Environment . IsDevelopment ( ) )
165163 {
166164 app . UseDeveloperExceptionPage ( ) ;
167165 app . UseMigrationsEndPoint ( ) ;
Original file line number Diff line number Diff line change 1818
1919var services = builder . Services ;
2020var configuration = builder . Configuration ;
21- var env = builder . Environment ;
2221
2322var stsServer = configuration [ "OpenIDConnectSettings:Authority" ] ;
2423
2524services . AddSecurityHeaderPolicies ( )
2625 . SetPolicySelector ( ( PolicySelectorContext ctx ) =>
2726 {
28- return SecurityHeadersDefinitions
29- . GetHeaderPolicyCollection ( env . IsDevelopment ( ) , stsServer ) ;
27+ return SecurityHeadersDefinitions . GetHeaderPolicyCollection (
28+ builder . Environment . IsDevelopment ( ) , stsServer ) ;
3029 } ) ;
3130
3231services . AddAntiforgery ( options =>
8483// Do not add to deployments, for debug reasons
8584IdentityModelEventSource . ShowPII = true ;
8685
87- if ( env . IsDevelopment ( ) )
86+ if ( app . Environment . IsDevelopment ( ) )
8887{
8988 app . UseDeveloperExceptionPage ( ) ;
9089 app . UseWebAssemblyDebugging ( ) ;
You can’t perform that action at this time.
0 commit comments