Add urlprefixes during init

This commit is contained in:
Claus Vium 2019-03-07 22:49:41 +01:00
parent 669c48cc8b
commit e3b844b5aa
3 changed files with 6 additions and 4 deletions

View File

@ -1056,7 +1056,7 @@ namespace Emby.Server.Implementations
.Where(i => i != null) .Where(i => i != null)
.ToArray(); .ToArray();
HttpServer.Init(GetExports<IService>(false), GetExports<IWebSocketListener>()); HttpServer.Init(GetExports<IService>(false), GetExports<IWebSocketListener>(), GetUrlPrefixes());
LibraryManager.AddParts(GetExports<IResolverIgnoreRule>(), LibraryManager.AddParts(GetExports<IResolverIgnoreRule>(),
GetExports<IItemResolver>(), GetExports<IItemResolver>(),

View File

@ -676,10 +676,12 @@ namespace Emby.Server.Implementations.HttpServer
/// Adds the rest handlers. /// Adds the rest handlers.
/// </summary> /// </summary>
/// <param name="services">The services.</param> /// <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(); _webSocketListeners = listeners.ToArray();
UrlPrefixes = urlPrefixes.ToArray();
ServiceController = new ServiceController(); ServiceController = new ServiceController();
Logger.LogInformation("Calling ServiceStack AppHost.Init"); Logger.LogInformation("Calling ServiceStack AppHost.Init");

View File

@ -32,7 +32,7 @@ namespace MediaBrowser.Controller.Net
/// <summary> /// <summary>
/// Inits this instance. /// Inits this instance.
/// </summary> /// </summary>
void Init(IEnumerable<IService> services, IEnumerable<IWebSocketListener> listener); void Init(IEnumerable<IService> services, IEnumerable<IWebSocketListener> listener, IEnumerable<string> urlPrefixes);
/// <summary> /// <summary>
/// If set, all requests will respond with this message /// If set, all requests will respond with this message