diff --git a/WebCodeFlowPkceClient/HostingExtensions.cs b/WebCodeFlowPkceClient/HostingExtensions.cs index 7c4cdd3..bc0eaa7 100644 --- a/WebCodeFlowPkceClient/HostingExtensions.cs +++ b/WebCodeFlowPkceClient/HostingExtensions.cs @@ -8,13 +8,10 @@ namespace WebCodeFlowPkceClient; internal static class HostingExtensions { - private static IWebHostEnvironment? _env; - public static WebApplication ConfigureServices(this WebApplicationBuilder builder) { var services = builder.Services; var configuration = builder.Configuration; - _env = builder.Environment; services.AddTransient(); @@ -60,7 +57,7 @@ public static WebApplication ConfigurePipeline(this WebApplication app) app.UseSerilogRequestLogging(); - if (_env!.IsDevelopment()) + if (app.Environment.IsDevelopment()) { app.UseDeveloperExceptionPage(); }