Add response compression

Reduces dashboard load size from 677kb to 153kb
This commit is contained in:
flightlevel
2018-05-12 12:51:46 +10:00
parent ce84264490
commit 8002483e68

View File

@@ -33,6 +33,8 @@ namespace Jackett.Server
// This method gets called by the runtime. Use this method to add services to the container.
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddResponseCompression();
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(CookieAuthenticationDefaults.AuthenticationScheme,
options =>
@@ -81,6 +83,8 @@ namespace Jackett.Server
{
Initialisation.Initialize();
app.UseResponseCompression();
app.UseDeveloperExceptionPage();
app.UseCustomExceptionHandler();