mirror of
https://github.com/farcasclaudiu/AzureStaticWebApp-CSharp-SimpleDemo.git
synced 2026-06-22 07:01:03 +03:00
adding security
This commit is contained in:
@@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Azure.Functions.Authentication.WebAssembly;
|
||||
|
||||
namespace SimpleDemo
|
||||
{
|
||||
@@ -18,6 +19,7 @@ namespace SimpleDemo
|
||||
builder.RootComponents.Add<App>("#app");
|
||||
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
||||
builder.Services.AddStaticWebAppsAuthentication();
|
||||
|
||||
await builder.Build().RunAsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user