diff --git a/Oqtane.Client/Program.cs b/Oqtane.Client/Program.cs index 8c9b118a..74fa8de4 100644 --- a/Oqtane.Client/Program.cs +++ b/Oqtane.Client/Program.cs @@ -5,6 +5,7 @@ using Oqtane.Services; using System.Reflection; using System; using System.Linq; +using System.Net.Http; using Oqtane.Modules; using Oqtane.Shared; using Oqtane.Providers; @@ -19,7 +20,9 @@ namespace Oqtane.Client var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("app"); - builder.Services.AddBaseAddressHttpClient(); + builder.Services.AddSingleton( + new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) } + ); builder.Services.AddOptions(); // register auth services