Remove top level environment variables from default config

This commit is contained in:
David Fowler 2016-01-20 22:14:17 +00:00
parent cad9ea1df7
commit cb029209a3
1 changed files with 2 additions and 3 deletions

View File

@ -20,12 +20,11 @@ namespace Microsoft.AspNet.Hosting
{ WebHostDefaults.CaptureStartupErrorsKey, "true" }
};
// We are adding all environment variables first and then adding the ASPNET_ ones
// with the prefix removed to unify with the command line and config file formats
// Setup the default locations for finding hosting configuration options
// hosting.json, ASPNET_ prefixed env variables and command line arguments
var configBuilder = new ConfigurationBuilder()
.AddInMemoryCollection(defaultSettings)
.AddJsonFile(WebHostDefaults.HostingJsonFile, optional: true)
.AddEnvironmentVariables()
.AddEnvironmentVariables(prefix: WebHostDefaults.EnvironmentVariablesPrefix);
if (args != null)