fixes #1248 - Browsing to /web/ causes error

This commit is contained in:
Luke Pulverenti 2015-12-01 22:11:08 -05:00
parent 3800fe9051
commit 10f9aaaee4

View File

@ -330,6 +330,16 @@ namespace MediaBrowser.Server.Implementations.HttpServer
httpRes.RedirectToUrl("emby/" + DefaultRedirectPath); httpRes.RedirectToUrl("emby/" + DefaultRedirectPath);
return Task.FromResult(true); return Task.FromResult(true);
} }
if (string.Equals(localPath, "/web", StringComparison.OrdinalIgnoreCase))
{
httpRes.RedirectToUrl(DefaultRedirectPath);
return Task.FromResult(true);
}
if (string.Equals(localPath, "/web/", StringComparison.OrdinalIgnoreCase))
{
httpRes.RedirectToUrl("../" + DefaultRedirectPath);
return Task.FromResult(true);
}
if (string.Equals(localPath, "/", StringComparison.OrdinalIgnoreCase)) if (string.Equals(localPath, "/", StringComparison.OrdinalIgnoreCase))
{ {
httpRes.RedirectToUrl(DefaultRedirectPath); httpRes.RedirectToUrl(DefaultRedirectPath);