fixs http url loading

This commit is contained in:
Madpeter 2020-10-13 16:04:26 +01:00
parent 0498625674
commit ec882b5187

View file

@ -33,6 +33,7 @@ namespace BetterSecondBot.HttpServer
protected JsonConfig Config; protected JsonConfig Config;
public JsonConfig GetConfig { get { return Config; } } public JsonConfig GetConfig { get { return Config; } }
protected HTTPCommandsInterface post_controler; protected HTTPCommandsInterface post_controler;
protected string url = ""; protected string url = "";
public bool ShutdownHTTP { get; set; } public bool ShutdownHTTP { get; set; }
public bool HTTPCnCmode { get; set; } public bool HTTPCnCmode { get; set; }
@ -78,6 +79,7 @@ namespace BetterSecondBot.HttpServer
Config = setConfig; Config = setConfig;
Bot = LinkBot; Bot = LinkBot;
int port = Math.Abs(Config.Http_Port); int port = Math.Abs(Config.Http_Port);
url = Config.Http_Host;
if (Config.Http_Host == "docker") if (Config.Http_Host == "docker")
{ {
url = "http://*:" + port.ToString() + "/"; url = "http://*:" + port.ToString() + "/";