support api without /mediabrowser

This commit is contained in:
Luke Pulverenti
2015-01-17 14:30:23 -05:00
parent 5f3c2f68b0
commit a8da86d059
15 changed files with 71 additions and 112 deletions

View File

@@ -130,12 +130,12 @@ namespace MediaBrowser.Server.Startup.Common
{
var list = new List<string>
{
"http://+:" + ServerConfigurationManager.Configuration.HttpServerPortNumber + "/" + WebApplicationName + "/"
"http://+:" + ServerConfigurationManager.Configuration.HttpServerPortNumber + "/"
};
if (ServerConfigurationManager.Configuration.UseHttps)
{
list.Add("https://+:" + ServerConfigurationManager.Configuration.HttpsPortNumber + "/" + WebApplicationName + "/");
list.Add("https://+:" + ServerConfigurationManager.Configuration.HttpsPortNumber + "/");
}
return list;
@@ -472,7 +472,7 @@ namespace MediaBrowser.Server.Startup.Common
_supportsNativeWebSocket = false;
}
HttpServer = ServerFactory.CreateServer(this, LogManager, "Media Browser", WebApplicationName, "dashboard/index.html", false);
HttpServer = ServerFactory.CreateServer(this, LogManager, "Media Browser", "web/index.html", false);
RegisterSingleInstance(HttpServer, false);
progress.Report(10);
@@ -810,7 +810,7 @@ namespace MediaBrowser.Server.Startup.Common
{
try
{
ServerManager.Start(HttpServerUrlPrefixes, CertificatePath);
ServerManager.Start(HttpServerUrlPrefixes, ServerConfigurationManager.Configuration.CertificatePath);
}
catch (Exception ex)
{
@@ -977,8 +977,6 @@ namespace MediaBrowser.Server.Startup.Common
CachePath = ApplicationPaths.CachePath,
MacAddress = GetMacAddress(),
HttpServerPortNumber = HttpServerPort,
UseHttps = UseHttps,
CertificatePath = CertificatePath,
OperatingSystem = OperatingSystemDisplayName,
CanSelfRestart = CanSelfRestart,
CanSelfUpdate = CanSelfUpdate,
@@ -1053,16 +1051,6 @@ namespace MediaBrowser.Server.Startup.Common
get { return ServerConfigurationManager.Configuration.HttpServerPortNumber; }
}
public bool UseHttps
{
get { return this.ServerConfigurationManager.Configuration.UseHttps; }
}
public string CertificatePath
{
get { return this.ServerConfigurationManager.Configuration.CertificatePath; }
}
public int HttpsServerPort
{
get { return ServerConfigurationManager.Configuration.HttpsPortNumber; }

View File

@@ -18,8 +18,7 @@ namespace MediaBrowser.Server.Startup.Common.Browser
/// <param name="logger">The logger.</param>
public static void OpenDashboardPage(string page, IServerApplicationHost appHost, ILogger logger)
{
var url = "http://localhost:" + appHost.HttpServerPort + "/" +
appHost.WebApplicationName + "/web/" + page;
var url = "http://localhost:" + appHost.HttpServerPort + "/web/" + page;
OpenUrl(url, logger);
}
@@ -69,8 +68,7 @@ namespace MediaBrowser.Server.Startup.Common.Browser
/// <param name="logger">The logger.</param>
public static void OpenSwagger(IServerApplicationHost appHost, ILogger logger)
{
OpenUrl("http://localhost:" + appHost.HttpServerPort + "/" +
appHost.WebApplicationName + "/swagger-ui/index.html", logger);
OpenUrl("http://localhost:" + appHost.HttpServerPort + "/swagger-ui/index.html", logger);
}
/// <summary>