Unleash client init
This commit is contained in:
@ -83,7 +83,6 @@ namespace isn
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app,
|
||||
Microsoft.AspNetCore.Hosting.IHostingEnvironment env,
|
||||
IOptions<UnleashClientSettings> unleashClientSettings,
|
||||
ApplicationDbContext dbContext)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
@ -98,18 +97,7 @@ namespace isn
|
||||
dbContext.Database.Migrate();
|
||||
}
|
||||
|
||||
var unleashSettings = new UnleashSettings
|
||||
{
|
||||
UnleashApi = new Uri(unleashClientSettings.Value.ApiUrl),
|
||||
AppName = "isnd",
|
||||
Environment = env.EnvironmentName,
|
||||
CustomHttpHeaders = new Dictionary<string, string>
|
||||
{
|
||||
{ "Authorization", unleashClientSettings.Value.ClientApiKey }
|
||||
}
|
||||
};
|
||||
UnleashClientFactory unleashClientFactory = new UnleashClientFactory();
|
||||
UnleashĈlient = unleashClientFactory.CreateClient(unleashSettings);
|
||||
|
||||
|
||||
app.UseStatusCodePages().UseStaticFiles().UseAuthentication().UseMvc(routes =>
|
||||
{
|
||||
|
Reference in New Issue
Block a user