Merge pull request #2295 from chlupac/AppSettingsFix

Fixed loading of alternative appsettings "appsettings.{env.EnvironmentName}.json"
This commit is contained in:
Shaun Walker 2022-07-19 14:20:08 -04:00 committed by GitHub
commit 25155b1b38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,8 @@ namespace Oqtane
{
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", true, true);
Configuration = builder.Build();
_supportedCultures = localizationManager.GetSupportedCultures();