Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
Fix environment variable loading in hosting #470
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym committed Nov 10, 2015
1 parent 660f1ca commit b2edb0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Microsoft.AspNet.Hosting/WebApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ public static void Run(Type startupType, string[] args)

internal static IConfiguration LoadHostingConfiguration(string configJsonPath, string[] args)
{
// 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
return new ConfigurationBuilder()
.AddJsonFile(configJsonPath, optional: true)
.AddEnvironmentVariables()
.AddEnvironmentVariables(prefix: EnvironmentVariablesPrefix)
.AddCommandLine(args)
.Build();
Expand Down

0 comments on commit b2edb0d

Please sign in to comment.