aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Program.cs
diff options
context:
space:
mode:
authorMark Monteiro <marknr.monteiro@protonmail.com>2020-02-25 17:02:51 +0100
committerMark Monteiro <marknr.monteiro@protonmail.com>2020-02-25 17:02:51 +0100
commitf3be93a4de86177d87a3be919b7aaa6e394b819d (patch)
tree03a27f051ecf07d8ec75280b90862a39b83466f1 /Jellyfin.Server/Program.cs
parent1b5999a1bc11ee386131e4bbce561896c0e1bced (diff)
Use the swagger API page as the default redirect path if not hosting the jellyfin-web content
Diffstat (limited to 'Jellyfin.Server/Program.cs')
-rw-r--r--Jellyfin.Server/Program.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index 2ce7379fb..8c133576c 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -468,9 +468,16 @@ namespace Jellyfin.Server
await resource.CopyToAsync(dst).ConfigureAwait(false);
}
+ // Use the swagger API page as the default redirect path if not hosting the jellyfin-web content
+ var inMemoryDefaultConfig = ConfigurationOptions.DefaultConfiguration;
+ if (string.IsNullOrEmpty(appPaths.WebPath))
+ {
+ inMemoryDefaultConfig["HttpListenerHost:DefaultRedirectPath"] = "swagger/index.html";
+ }
+
return new ConfigurationBuilder()
.SetBasePath(appPaths.ConfigurationDirectoryPath)
- .AddInMemoryCollection(ConfigurationOptions.Configuration)
+ .AddInMemoryCollection(inMemoryDefaultConfig)
.AddJsonFile("logging.json", false, true)
.AddEnvironmentVariables("JELLYFIN_")
.Build();