From cb029209a386d596b93d531d9ba1baf69aef980d Mon Sep 17 00:00:00 2001 From: David Fowler Date: Wed, 20 Jan 2016 22:14:17 +0000 Subject: [PATCH] Remove top level environment variables from default config --- src/Microsoft.AspNet.Hosting/WebHostConfiguration.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNet.Hosting/WebHostConfiguration.cs b/src/Microsoft.AspNet.Hosting/WebHostConfiguration.cs index 76d539117a..dc331e9adb 100644 --- a/src/Microsoft.AspNet.Hosting/WebHostConfiguration.cs +++ b/src/Microsoft.AspNet.Hosting/WebHostConfiguration.cs @@ -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)