mirror of https://github.com/jellyfin/jellyfin.git
keep old base url for now
This commit is contained in:
parent
d521e5c36a
commit
97d6c2db6b
|
@ -602,6 +602,13 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
Priority = route.Priority,
|
Priority = route.Priority,
|
||||||
Summary = route.Summary
|
Summary = route.Summary
|
||||||
});
|
});
|
||||||
|
|
||||||
|
routes.Add(new RouteAttribute(NormalizeOldRoutePath(route.Path), route.Verbs)
|
||||||
|
{
|
||||||
|
Notes = route.Notes,
|
||||||
|
Priority = route.Priority,
|
||||||
|
Summary = route.Summary
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return routes.ToArray();
|
return routes.ToArray();
|
||||||
|
@ -637,6 +644,17 @@ namespace Emby.Server.Implementations.HttpServer
|
||||||
return _socketListener.ProcessWebSocketRequest(context);
|
return _socketListener.ProcessWebSocketRequest(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this method was left for compatibility with third party clients
|
||||||
|
private static string NormalizeOldRoutePath(string path)
|
||||||
|
{
|
||||||
|
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return "/emby" + path;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "emby/" + path;
|
||||||
|
}
|
||||||
|
|
||||||
private static string NormalizeCustomRoutePath(string baseUrl, string path)
|
private static string NormalizeCustomRoutePath(string baseUrl, string path)
|
||||||
{
|
{
|
||||||
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
if (path.StartsWith("/", StringComparison.OrdinalIgnoreCase))
|
||||||
|
|
Loading…
Reference in New Issue