add ipv6 listener prefix
This commit is contained in:
parent
0bfe34ab6b
commit
f14294387e
|
|
@ -24,12 +24,13 @@ public sealed class HttpServer {
|
|||
conf = configuration;
|
||||
listener = new HttpListener();
|
||||
listener.Prefixes.Add($"http://localhost:{port}/");
|
||||
listener.Prefixes.Add($"http://[::1]:{port}/");
|
||||
mainLogger = new(LogOutputTopic.Main, conf);
|
||||
requestLogger = new(LogOutputTopic.Request, conf);
|
||||
}
|
||||
|
||||
public void Start() {
|
||||
mainLogger.Information($"Starting on port {Port}...");
|
||||
mainLogger.Information($"Starting on port {Port} (IPv4+IPv6)...");
|
||||
Assert(listenerTask == null, "Server was already started!");
|
||||
listener.Start();
|
||||
listenerTask = Task.Run(GetContextLoopAsync);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user