In hosted template, enable response compression for .wasm
This commit is contained in:
parent
4eb78b3a8f
commit
678721cbad
|
|
@ -1,6 +1,7 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using Microsoft.AspNetCore.Blazor.Server;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.ResponseCompression;
|
||||
|
|
@ -24,8 +25,11 @@ namespace BlazorHosted.CSharp.Server
|
|||
|
||||
services.AddResponseCompression(options =>
|
||||
{
|
||||
options.MimeTypes = ResponseCompressionDefaults.MimeTypes
|
||||
.Concat(new[] { MediaTypeNames.Application.Octet });
|
||||
options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(new[]
|
||||
{
|
||||
MediaTypeNames.Application.Octet,
|
||||
WasmMediaTypeNames.Application.Wasm,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue