mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-01-30 16:37:29 +01:00
Server fix interfaces on windows
This commit is contained in:
parent
0f9ac60fcd
commit
12b1b2afd6
@ -1,4 +1,5 @@
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Logging;
|
||||
@ -18,7 +19,10 @@ public class Server
|
||||
public Server(int port, TaskManager taskManager, Logger? logger = null)
|
||||
{
|
||||
this.logger = logger;
|
||||
if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
this._listener.Prefixes.Add($"http://*:{port}/");
|
||||
else
|
||||
this._listener.Prefixes.Add($"http://localhost:{port}/");
|
||||
this._requestHandler = new RequestHandler(taskManager, this);
|
||||
Listen();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user