File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
App/kernel-memory/service/Service Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -84,18 +84,20 @@ public static void Main(string[] args)
8484
8585 appBuilder . Configuration . AddKMConfigurationSources ( ) ;
8686
87+ var servicesConfig = appBuilder . Configuration . GetSection ( "KernelMemory" ) . Get < KernelMemoryConfig > ( ) ;
88+ string appEnv = servicesConfig ? . APP_ENV ;
89+
8790 // Add Configuration from App Configuration Service
8891 appBuilder . Configuration . AddAzureAppConfiguration ( options =>
8992 {
90- options . Connect ( new Uri ( appBuilder . Configuration [ "ConnectionStrings:AppConfig" ] ) , azure_credential_utils . GetAzureCredential ( ) ) ;
93+ options . Connect ( new Uri ( appBuilder . Configuration [ "ConnectionStrings:AppConfig" ] ) , azure_credential_utils . GetAzureCredential ( appEnv : appEnv ) ) ;
9194 } ) ;
9295
9396
9497 // Read KM settings, needed before building the app.
9598 KernelMemoryConfig config = appBuilder . Configuration . GetSection ( "KernelMemory" ) . Get < KernelMemoryConfig > ( )
9699 ?? throw new ConfigurationException ( "Unable to load configuration" ) ;
97100
98- AppGlobals . Init ( appBuilder . Configuration ) ;
99101 // Some OpenAPI Explorer/Swagger dependencies
100102 appBuilder . ConfigureSwagger ( config ) ;
101103
You can’t perform that action at this time.
0 commit comments