mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-14 14:22:02 +01:00
Change listen from loopback to any ip address for dotnetcore2.0 apps per issue #124
Change listen from loopback to any ip address for dotnetcore2.0 apps per issue #124 (#125)
This commit is contained in:
committed by
Stef Heyenrath
parent
a29363105c
commit
7bd63a0baf
@@ -76,13 +76,13 @@ namespace WireMock.Owin
|
||||
foreach (string url in _urls.Where(u => u.StartsWith("http://", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
PortUtil.TryExtractProtocolAndPort(url, out string host, out int port);
|
||||
options.Listen(System.Net.IPAddress.Loopback, port);
|
||||
options.Listen(System.Net.IPAddress.Any, port);
|
||||
}
|
||||
|
||||
foreach (string url in _urls.Where(u => u.StartsWith("https://", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
PortUtil.TryExtractProtocolAndPort(url, out string host, out int port);
|
||||
options.Listen(System.Net.IPAddress.Loopback, port, listenOptions =>
|
||||
options.Listen(System.Net.IPAddress.Any, port, listenOptions =>
|
||||
{
|
||||
listenOptions.UseHttps(PublicCertificateHelper.GetX509Certificate2());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user