mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-26 02:08:29 +02:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user