aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2019-03-07 22:54:02 +0100
committerGitHub <noreply@github.com>2019-03-07 22:54:02 +0100
commit757e0194b9985c204a4dcfb105f091fd1100bb44 (patch)
treeaa2cd8253d58b6d9264c37fcece7430a3cf16ec6
parent669c48cc8bd6b9023d54a38c8e8b7f4120cb7368 (diff)
parente3b844b5aa34ef6a8f4a23c053115f4eabadcbf7 (diff)
Merge pull request #1067 from cvium/add_urlprefixes
Add urlprefixes during init
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs2
-rw-r--r--Emby.Server.Implementations/HttpServer/HttpListenerHost.cs6
-rw-r--r--MediaBrowser.Controller/Net/IHttpServer.cs2
3 files changed, 6 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index a581214c7..f7d9bad1b 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.cs
index eab755cef..e8d47cad5 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.cs
index cede9a98f..46933c046 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