aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaus Vium <clausvium@gmail.com>2019-02-26 20:40:05 +0100
committerClaus Vium <clausvium@gmail.com>2019-02-26 22:11:21 +0100
commite88f079da64a978d560f739e9bf17cd0a93d122a (patch)
treedb1eb95d82b248b4d042daa5df6f1c8483435c2f
parent4e8de67acabbfe1aeb5fee6d1162abc760fbd540 (diff)
Remove websocket options and configure kestrel listen ports
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index ad6b8e84a..7be39d674 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -111,13 +111,11 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.AspNetCore.Mvc.Infrastructure;
-using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using ServiceStack;
-using HttpResponse = MediaBrowser.Model.Net.HttpResponse;
using X509Certificate = System.Security.Cryptography.X509Certificates.X509Certificate;
namespace Emby.Server.Implementations
@@ -623,21 +621,24 @@ namespace Emby.Server.Implementations
FindParts();
Host = new WebHostBuilder()
- .UseKestrel()
+ .UseKestrel(options =>
+ {
+ options.Listen(IPAddress.Any, HttpPort);
+ options.Listen(IPAddress.Loopback, HttpPort);
+ // TODO certs
+ options.Listen(IPAddress.Any, HttpsPort, listenOptions => { listenOptions.UseHttps(); });
+ options.Listen(IPAddress.Loopback, HttpsPort, listenOptions => { listenOptions.UseHttps(); });
+ })
.UseContentRoot(Path.Combine(Directory.GetCurrentDirectory(), "jellyfin-web", "src"))
- .UseUrls("http://localhost:8096")
.ConfigureServices(services =>
{
services.AddResponseCompression();
services.AddHttpContextAccessor();
services.TryAddSingleton<IActionContextAccessor, ActionContextAccessor>();
})
- .Configure( app =>
+ .Configure(app =>
{
- app.UseWebSockets(new WebSocketOptions {
- KeepAliveInterval = TimeSpan.FromMilliseconds(1000000000),
- ReceiveBufferSize = 0x10000
- });
+ app.UseWebSockets();
app.UseResponseCompression();
app.Use(ExecuteWebsocketHandlerAsync);