mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-24 17:58:47 +02:00
fix port (#446)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"profiles": {
|
||||
"WireMock.Net.StandAlone.NETCoreApp": {
|
||||
"commandName": "Project",
|
||||
"commandLineArgs": "--Urls http://*:9091 --WireMockLogger WireMockConsoleLogger"
|
||||
"commandLineArgs": "--Port 9091 --WireMockLogger WireMockConsoleLogger"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ namespace WireMock.Owin
|
||||
{
|
||||
public ICollection<string> Urls { get; set; }
|
||||
|
||||
public int? Port { get; set; }
|
||||
|
||||
public bool UseSSL { get; set; }
|
||||
|
||||
public ICollection<(string Url, int Port)> GetDetails()
|
||||
@@ -14,7 +16,7 @@ namespace WireMock.Owin
|
||||
var list = new List<(string Url, int Port)>();
|
||||
if (Urls == null)
|
||||
{
|
||||
int port = FindFreeTcpPort();
|
||||
int port = Port ?? FindFreeTcpPort();
|
||||
list.Add(($"{(UseSSL ? "https" : "http")}://localhost:{port}", port));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -214,7 +214,8 @@ namespace WireMock.Server
|
||||
{
|
||||
urlOptions = new HostUrlOptions
|
||||
{
|
||||
UseSSL = settings.UseSSL == true
|
||||
UseSSL = settings.UseSSL == true,
|
||||
Port = settings.Port
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user