The Free Software Media System - Server Backend & API
Add response compression middleware
Claus Vium38f52a139e80
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex ca1dceedfa..da9550b851 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -646,7 +646,7 @@ namespace Emby.Server.Implementations.UseUrls("http://localhost:8096").ConfigureServices(services =>{- services.AddRouting();+ services.AddResponseCompression();services.AddHttpContextAccessor();services.TryAddSingleton<IActionContextAccessor, ActionContextAccessor>();})@@ -657,6 +657,7 @@ namespace Emby.Server.ImplementationsReceiveBufferSize = 0x10000});+ app.UseResponseCompression();app.Use(ExecuteWebsocketHandlerAsync);app.Use(ExecuteHttpHandlerAsync);})diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csprojindex acbc60c39e..a4dac4a7f9 100644--- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj+++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj@@ -29,6 +29,8 @@<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.2.0" /><PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" /><PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />+ <PackageReference Include="Microsoft.AspNetCore.ResponseCaching" Version="2.2.0" />+ <PackageReference Include="Microsoft.AspNetCore.ResponseCompression" Version="2.2.0" /><PackageReference Include="Microsoft.AspNetCore.Routing" Version="2.2.2" /><PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" /><PackageReference Include="Microsoft.AspNetCore.WebSockets" Version="2.2.1" />