I am trying to get response compression working in a .NET Core 3.1, but it is not working.
In ConfigureServices I have the following;
public void ConfigureServices(IServiceCollection services)
{
services.AddResponseCompression();
services.AddControllers();
//All my other services
}
My Configure is the following:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseHsts();
}
app.UseResponseCompression();
app.UseHttpsRedirection()
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization()
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
})
}
When using a controller in Postman I am not seeing Content-Encoding set to gzip;
