The Free Software Media System - Server Backend & API
Add urlprefixes during init
Claus Viume3b844b5aa34
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex a581214c71..f7d9bad1b0 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -1056,7 +1056,7 @@ namespace Emby.Server.Implementations.Where(i => i != null).ToArray();- HttpServer.Init(GetExports<IService>(false), GetExports<IWebSocketListener>());+ HttpServer.Init(GetExports<IService>(false), GetExports<IWebSocketListener>(), GetUrlPrefixes());LibraryManager.AddParts(GetExports<IResolverIgnoreRule>(),GetExports<IItemResolver>(),diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.csindex eab755cefb..e8d47cad52 100644--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs@@ -676,10 +676,12 @@ namespace Emby.Server.Implementations.HttpServer/// Adds the rest handlers./// </summary>/// <param name="services">The services.</param>- public void Init(IEnumerable<IService> services, IEnumerable<IWebSocketListener> listeners)+ /// <param name="listeners"></param>+ /// <param name="urlPrefixes"></param>+ public void Init(IEnumerable<IService> services, IEnumerable<IWebSocketListener> listeners, IEnumerable<string> urlPrefixes){_webSocketListeners = listeners.ToArray();-+ UrlPrefixes = urlPrefixes.ToArray();ServiceController = new ServiceController();Logger.LogInformation("Calling ServiceStack AppHost.Init");diff --git a/MediaBrowser.Controller/Net/IHttpServer.cs b/MediaBrowser.Controller/Net/IHttpServer.csindex cede9a98fb..46933c0465 100644--- a/MediaBrowser.Controller/Net/IHttpServer.cs+++ b/MediaBrowser.Controller/Net/IHttpServer.cs@@ -32,7 +32,7 @@ namespace MediaBrowser.Controller.Net/// <summary>/// Inits this instance./// </summary>- void Init(IEnumerable<IService> services, IEnumerable<IWebSocketListener> listener);+ void Init(IEnumerable<IService> services, IEnumerable<IWebSocketListener> listener, IEnumerable<string> urlPrefixes);/// <summary>/// If set, all requests will respond with this message