diff --git a/src/Interlinked.Core/Interlinked.Core.csproj b/src/Interlinked.Core/Interlinked.Core.csproj index cd83cbf..c640a98 100644 --- a/src/Interlinked.Core/Interlinked.Core.csproj +++ b/src/Interlinked.Core/Interlinked.Core.csproj @@ -9,6 +9,8 @@ + + diff --git a/src/Interlinked.Core/Program.cs b/src/Interlinked.Core/Program.cs index 779e1bf..88b7453 100644 --- a/src/Interlinked.Core/Program.cs +++ b/src/Interlinked.Core/Program.cs @@ -2,12 +2,25 @@ using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Interlinked.Core; using Syncfusion.Blazor; +using Microsoft.AspNetCore.ResponseCompression; +using Microsoft.AspNetCore.Builder; -var builder = WebAssemblyHostBuilder.CreateDefault(args); -builder.RootComponents.Add("#app"); -builder.RootComponents.Add("head::after"); -IServiceCollection serviceCollection = builder.Services.AddSyncfusionBlazor(); +internal class Program +{ + private static async Task Main(string[] args) + { + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add("#app"); + builder.RootComponents.Add("head::after"); + IServiceCollection serviceCollection = builder.Services.AddSyncfusionBlazor(); -builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); + builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); -await builder.Build().RunAsync(); + builder.Services.AddResponseCompression(opts => + { + opts.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat( + new[] { "application/octet-stream" }); + }); + await builder.Build().RunAsync(); + } +} \ No newline at end of file