using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.ResponseCompression; using Microsoft.Extensions.DependencyInjection; using System.IO.Compression; namespace IRaCIS.Core.API { public static class ResponseCompressionSetup { public static void AddResponseCompressionSetup(this IServiceCollection services) { services.AddResponseCompression(options => { options.EnableForHttps = true; options.Providers.Add(); options.Providers.Add(); }); services.Configure(options => { options.Level = CompressionLevel.Optimal; }); services.Configure(options => { options.Level = CompressionLevel.Optimal; }); } } }