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