Fix the configuration key name for PreferHostingUrls (#1034)
This commit is contained in:
parent
383a13f1f9
commit
58cc0bc3f9
|
|
@ -155,7 +155,7 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
/// <returns>The <see cref="IWebHostBuilder"/>.</returns>
|
||||
public static IWebHostBuilder PreferHostingUrls(this IWebHostBuilder hostBuilder, bool preferHostingUrls)
|
||||
{
|
||||
return hostBuilder.UseSetting(WebHostDefaults.PreferHostingUrls, preferHostingUrls ? "true" : "false");
|
||||
return hostBuilder.UseSetting(WebHostDefaults.PreferHostingUrlsKey, preferHostingUrls ? "true" : "false");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
public static readonly string CaptureStartupErrorsKey = "captureStartupErrors";
|
||||
public static readonly string ServerUrlsKey = "urls";
|
||||
public static readonly string ContentRootKey = "contentRoot";
|
||||
public static readonly string PreferHostingUrls = "preferHostingUrls";
|
||||
public static readonly string PreferHostingUrlsKey = "preferHostingUrls";
|
||||
|
||||
public static readonly string ShutdownTimeoutKey = "shutdownTimeoutSeconds";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.Hosting.Internal
|
|||
WebRoot = configuration[WebHostDefaults.WebRootKey];
|
||||
ContentRootPath = configuration[WebHostDefaults.ContentRootKey];
|
||||
HostingStartupAssemblies = configuration[WebHostDefaults.HostingStartupAssembliesKey]?.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries) ?? new string[0];
|
||||
PreferHostingUrls = ParseBool(configuration, WebHostDefaults.PreferHostingUrls);
|
||||
PreferHostingUrls = ParseBool(configuration, WebHostDefaults.PreferHostingUrlsKey);
|
||||
|
||||
var timeout = configuration[WebHostDefaults.ShutdownTimeoutKey];
|
||||
if (!string.IsNullOrEmpty(timeout)
|
||||
|
|
|
|||
Loading…
Reference in New Issue