mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
centralize ConfigurationBuilder
This commit is contained in:
@ -29,17 +29,7 @@ namespace Bit.Api
|
||||
public Startup(IHostingEnvironment env)
|
||||
{
|
||||
var builder = new ConfigurationBuilder()
|
||||
.SetBasePath(env.ContentRootPath)
|
||||
.AddJsonFile("settings.json")
|
||||
.AddJsonFile($"settings.{env.EnvironmentName}.json", optional: true);
|
||||
|
||||
if(env.IsDevelopment())
|
||||
{
|
||||
builder.AddUserSecrets<Startup>();
|
||||
}
|
||||
|
||||
builder.AddEnvironmentVariables();
|
||||
|
||||
.AddSettingsConfiguration<Startup>(env);
|
||||
Configuration = builder.Build();
|
||||
Environment = env;
|
||||
}
|
||||
|
Reference in New Issue
Block a user