require AntiForgery on Static Rendered components
This commit is contained in:
parent
f7895823cb
commit
bf4052b550
|
@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Routing;
|
|||
using System;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.AspNetCore.Antiforgery;
|
||||
|
||||
namespace OqtaneSSR.Extensions
|
||||
{
|
||||
|
@ -23,6 +24,7 @@ namespace OqtaneSSR.Extensions
|
|||
{
|
||||
routeEndpointBuilder.Metadata.Add(new RootComponentMetadata(typeof(App)));
|
||||
routeEndpointBuilder.Metadata.Add(new ComponentTypeMetadata(typeof(App)));
|
||||
routeEndpointBuilder.Metadata.Add(new RequireAntiforgeryTokenAttribute());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -216,6 +216,7 @@ namespace Oqtane
|
|||
app.UseCors();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseAntiforgery();
|
||||
|
||||
if (_useSwagger)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user