1- using TELBlazor . Components . Core . Configuration ;
2-
3- namespace LearningHub . Nhs . WebUI . Startup
1+ namespace LearningHub . Nhs . WebUI . Startup
42{
3+ using System ;
4+ using System . Net . Http ;
55 using Blazored . LocalStorage ;
66 using GDS . MultiPageFormData ;
77 using LearningHub . Nhs . Models . OpenAthens ;
@@ -19,8 +19,6 @@ namespace LearningHub.Nhs.WebUI.Startup
1919 using Microsoft . Extensions . Configuration ;
2020 using Microsoft . Extensions . DependencyInjection ;
2121 using Microsoft . Extensions . Hosting ;
22- using System ;
23- using System . Net . Http ;
2422 using TELBlazor . Components . Core . Configuration ;
2523 using TELBlazor . Components . Core . Services . HelperServices ;
2624 using static System . Net . Mime . MediaTypeNames ;
@@ -159,10 +157,12 @@ public static void AddLearningHubMappings(this IServiceCollection services, ICon
159157 var context = httpContextAccessor . HttpContext ;
160158 bool jsEnabled = false ;
161159
162- var environment = builder . Configuration [ "Environment" ] ;
160+ var configuration = provider . GetRequiredService < IConfiguration > ( ) ;
161+
162+ var environment = configuration [ "Environment" ] ;
163163
164164 // Azure cant have differing application values so we default to assembly name if not set
165- var application = builder . Configuration [ "Properties:Application" ] ??
165+ var application = configuration [ "Properties:Application" ] ??
166166 typeof ( Program ) . Assembly . GetName ( ) . Name ;
167167
168168 if ( context != null && context . Request . Cookies . TryGetValue ( "jsEnabled" , out var jsCookieValue ) )
0 commit comments