diff --git a/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Startup.cs b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Startup.cs index ea33b37150..5dbe24ce21 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Startup.cs +++ b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Startup.cs @@ -14,7 +14,11 @@ namespace BlazorHosted_CSharp.Server public void ConfigureServices(IServiceCollection services) { services.AddMvc().AddNewtonsoftJson(); - services.AddResponseCompression(); + services.AddResponseCompression(opts => + { + opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat( + new[] { "application/octet-stream" }); + }); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.