diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2023-05-25 17:07:43 +0200 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2023-05-25 17:07:43 +0200 |
| commit | d8d5c86d49cfb81baea5f7219fa495c2b7edf98c (patch) | |
| tree | 5befce0ac43b4f98ca29824641c5bf5fcc27c685 /Jellyfin.Server/Startup.cs | |
| parent | b37e9209df94dcad757d0b9ad0a7a7076c3cf743 (diff) | |
| parent | d67f10ba8c858626a8c9ea39c7cc48e3aa6ff415 (diff) | |
Merge branch 'master' into network-rewrite
Diffstat (limited to 'Jellyfin.Server/Startup.cs')
| -rw-r--r-- | Jellyfin.Server/Startup.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Jellyfin.Server/Startup.cs b/Jellyfin.Server/Startup.cs index 5b9397e30..b759b6bca 100644 --- a/Jellyfin.Server/Startup.cs +++ b/Jellyfin.Server/Startup.cs @@ -182,7 +182,7 @@ namespace Jellyfin.Server // This must be injected before any path related middleware. mainApp.UsePathTrim(); - mainApp.UseStaticFiles(); + if (appConfig.HostWebClient()) { var extensionProvider = new FileExtensionContentTypeProvider(); @@ -190,6 +190,11 @@ namespace Jellyfin.Server // subtitles octopus requires .data, .mem files. extensionProvider.Mappings.Add(".data", MediaTypeNames.Application.Octet); extensionProvider.Mappings.Add(".mem", MediaTypeNames.Application.Octet); + mainApp.UseDefaultFiles(new DefaultFilesOptions + { + FileProvider = new PhysicalFileProvider(_serverConfigurationManager.ApplicationPaths.WebPath), + RequestPath = "/web" + }); mainApp.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider(_serverConfigurationManager.ApplicationPaths.WebPath), @@ -200,6 +205,7 @@ namespace Jellyfin.Server mainApp.UseRobotsRedirection(); } + mainApp.UseStaticFiles(); mainApp.UseAuthentication(); mainApp.UseJellyfinApiSwagger(_serverConfigurationManager); mainApp.UseQueryStringDecoding(); |
