Fix loopback & localhost entry points for mono

This commit is contained in:
unknown
2015-07-19 18:26:07 -06:00
parent a37f1df313
commit d02a19b94b
2 changed files with 20 additions and 9 deletions

View File

@@ -18,14 +18,23 @@ namespace Jackett.Models.Config
public bool AllowExternal { get; set; }
public string APIKey { get; set; }
public string GetListenAddress(bool? external = null)
public string[] GetListenAddresses(bool? external = null)
{
if (external == null)
{
external = AllowExternal;
}
return "http://" + (external.Value ? "*" : "127.0.0.1") + ":" + Port + "/";
if (external.Value)
{
return new string[] { "http://*:" + Port + "/" };
}
else
{
return new string[] {
"http://127.0.0.1:" + Port + "/",
"http://localhost:" + Port + "/",
};
}
}
public string GenerateApi()