Make kestrel limits configurable (#520)

* Allow kestrel options to be overriden with values of config files and environment variables (see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-3.1#kestrel-options)

* Make appsettings.json optional

* Move changes to AspNetCoreSelfHost.Framework files.

* Implement ConfigureKestrelServerOptions for .NET Standard 1.3.
This commit is contained in:
Eduardo Cáceres
2020-10-15 15:05:07 +01:00
committed by GitHub
parent 65e01937a6
commit 94e176dd85
3 changed files with 42 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ namespace WireMock.Owin
}
_host = builder
.ConfigureAppConfigurationUsingEnvironmentVariables()
.ConfigureServices(services =>
{
services.AddSingleton(_options);
@@ -81,6 +82,7 @@ namespace WireMock.Owin
SetHttpsAndUrls(options, _urlOptions.GetDetails());
})
.ConfigureKestrelServerOptions()
#if NETSTANDARD1_3
.UseUrls(_urlOptions.GetDetails().Select(u => u.Url).ToArray())