aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkimboslice99 <94807745+kimboslice99@users.noreply.github.com>2024-03-18 10:37:23 -0400
committerGitHub <noreply@github.com>2024-03-18 08:37:23 -0600
commit350f17b59addaba332b7461a005adccb2107d388 (patch)
tree9512b3b78a25dea4c0f78a41c87948a74ecbd336
parent833bc06eb4e49d86ac8e5140f9a1cd4ef8dce9f5 (diff)
IIS Hosting (#11120)
-rw-r--r--Jellyfin.Server/Program.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs
index c70ef1719..fd7696906 100644
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@ -12,6 +12,7 @@ using Jellyfin.Server.Helpers;
using Jellyfin.Server.Implementations;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller;
+using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@@ -139,7 +140,15 @@ namespace Jellyfin.Server
host = Host.CreateDefaultBuilder()
.UseConsoleLifetime()
.ConfigureServices(services => appHost.Init(services))
- .ConfigureWebHostDefaults(webHostBuilder => webHostBuilder.ConfigureWebHostBuilder(appHost, startupConfig, appPaths, _logger))
+ .ConfigureWebHostDefaults(webHostBuilder =>
+ {
+ webHostBuilder.ConfigureWebHostBuilder(appHost, startupConfig, appPaths, _logger);
+ if (bool.TryParse(Environment.GetEnvironmentVariable("JELLYFIN_ENABLE_IIS"), out var iisEnabled) && iisEnabled)
+ {
+ _logger.LogCritical("UNSUPPORTED HOSTING ENVIRONMENT Microsoft Internet Information Services. The option to run Jellyfin on IIS is an unsupported and untested feature. Only use at your own discretion.");
+ webHostBuilder.UseIIS();
+ }
+ })
.ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(options, appPaths, startupConfig))
.UseSerilog()
.Build();