Add response compression middleware

This commit is contained in:
Claus Vium
2019-02-26 10:30:51 +01:00
parent 194da8416b
commit 38f52a139e
2 changed files with 4 additions and 1 deletions

View File

@@ -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.Implementations
ReceiveBufferSize = 0x10000
});
app.UseResponseCompression();
app.Use(ExecuteWebsocketHandlerAsync);
app.Use(ExecuteHttpHandlerAsync);
})