diff options
| author | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-03-15 13:01:05 +0100 |
|---|---|---|
| committer | Mark Monteiro <marknr.monteiro@protonmail.com> | 2020-03-15 13:01:05 +0100 |
| commit | 420e3619fb062727a914a4f73bf67edb9e9aaf6c (patch) | |
| tree | 89dcebd8adf0f0c65658e8a039f9237c853d3b58 /Jellyfin.Server/Program.cs | |
| parent | a9c1ff91193d8f645225ee9f7001370fe304ae8d (diff) | |
Use startup configuration to set the default redirect path
Diffstat (limited to 'Jellyfin.Server/Program.cs')
| -rw-r--r-- | Jellyfin.Server/Program.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index 6412db751..168ee081e 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -278,7 +278,7 @@ namespace Jellyfin.Server } } }) - .ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(appPaths)) + .ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(appPaths, startupConfig)) .UseSerilog() .ConfigureServices(services => { @@ -499,11 +499,11 @@ namespace Jellyfin.Server .Build(); } - private static IConfigurationBuilder ConfigureAppConfiguration(this IConfigurationBuilder config, IApplicationPaths appPaths) + private static IConfigurationBuilder ConfigureAppConfiguration(this IConfigurationBuilder config, IApplicationPaths appPaths, IConfiguration startupConfig = null) { // 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)) + if (startupConfig != null && startupConfig.NoWebContent()) { inMemoryDefaultConfig[HttpListenerHost.DefaultRedirectKey] = "swagger/index.html"; } |
