Use AddHttpContextAccessor()
This commit is contained in:
@ -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<IHttpContextAccessor, HttpContextAccessor>();
|
||||
builder.Services.AddHttpContextAccessor();
|
||||
|
||||
// Register localization services
|
||||
builder.Services.AddLocalization(options => options.ResourcesPath = "Resources");
|
||||
|
Reference in New Issue
Block a user