adjust HTTP
remove config for HTTP this is controlled in docker land as we no longer make windows/linux targeted builds.
This commit is contained in:
parent
c5e4543c9a
commit
4077259890
1 changed files with 2 additions and 2 deletions
|
|
@ -124,14 +124,14 @@ namespace SecondBotEvents.Services
|
||||||
{
|
{
|
||||||
Swan.Logging.Logger.UnregisterLogger<ConsoleLogger>();
|
Swan.Logging.Logger.UnregisterLogger<ConsoleLogger>();
|
||||||
HTTPendpoint = new WebServer(o => o
|
HTTPendpoint = new WebServer(o => o
|
||||||
.WithUrlPrefix("http://*:" + myConfig.GetPort().ToString())
|
.WithUrlPrefix("http://*:80")
|
||||||
.WithMode(HttpListenerMode.EmbedIO))
|
.WithMode(HttpListenerMode.EmbedIO))
|
||||||
.WithCors()
|
.WithCors()
|
||||||
.WithWebApi("/api", SerializationCallback, m => m.WithController(() => new HttpWebBot(master)))
|
.WithWebApi("/api", SerializationCallback, m => m.WithController(() => new HttpWebBot(master)))
|
||||||
.WithModule(new ActionModule("/", HttpVerbs.Any, ctx => ctx.SendDataAsync(new { Message = "Error" }))
|
.WithModule(new ActionModule("/", HttpVerbs.Any, ctx => ctx.SendDataAsync(new { Message = "Error" }))
|
||||||
);
|
);
|
||||||
HTTPendpoint.RunAsync();
|
HTTPendpoint.RunAsync();
|
||||||
LogFormater.Info("HTTP service [Enabled] on port "+ myConfig.GetPort().ToString());
|
LogFormater.Info("HTTP service [Enabled] on port 80");
|
||||||
}
|
}
|
||||||
public static async Task SerializationCallback(IHttpContext context, object? data)
|
public static async Task SerializationCallback(IHttpContext context, object? data)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue