From edc65e66c9b4449ad003b61ccc0ad6b366970b5b Mon Sep 17 00:00:00 2001 From: hishamco Date: Mon, 12 Oct 2020 18:26:04 +0300 Subject: [PATCH] Use AddHttpContextAccessor() --- Oqtane.Client/Oqtane.Client.csproj | 1 - Oqtane.Client/Program.cs | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Oqtane.Client/Oqtane.Client.csproj b/Oqtane.Client/Oqtane.Client.csproj index e85799c8..eaff964a 100644 --- a/Oqtane.Client/Oqtane.Client.csproj +++ b/Oqtane.Client/Oqtane.Client.csproj @@ -33,7 +33,6 @@ - diff --git a/Oqtane.Client/Program.cs b/Oqtane.Client/Program.cs index 9b29f544..7d3ea0a7 100644 --- a/Oqtane.Client/Program.cs +++ b/Oqtane.Client/Program.cs @@ -8,7 +8,6 @@ using System.Reflection; using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; -using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Oqtane.Modules; using Oqtane.Providers; @@ -27,7 +26,7 @@ namespace Oqtane.Client builder.Services.AddSingleton(httpClient); builder.Services.AddOptions(); - builder.Services.AddSingleton(); + builder.Services.AddHttpContextAccessor(); // Register localization services builder.Services.AddLocalization(options => options.ResourcesPath = "Resources");