We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 958779e commit 4b3f43eCopy full SHA for 4b3f43e
src/GettingThingsDone.WebApi/Startup.cs
@@ -19,6 +19,8 @@
19
using Newtonsoft.Json;
20
using Newtonsoft.Json.Serialization;
21
using Newtonsoft.Json.Converters;
22
+using Microsoft.AspNetCore.ResponseCompression;
23
+using System.IO.Compression;
24
25
namespace GettingThingsDone.WebApi
26
{
@@ -100,6 +102,11 @@ public void ConfigureServices(IServiceCollection services)
100
102
101
103
// Turn on default GZIP compression.
104
services.AddResponseCompression();
105
+ // Set GZIP options
106
+ services.Configure<GzipCompressionProviderOptions>(options =>
107
+ {
108
+ options.Level = CompressionLevel.Optimal; // Max reduce more CPU work
109
+ });
110
}
111
112
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
0 commit comments