File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/AbpCompanyName.AbpProjectName.Web/Startup Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 66using Castle . Facilities . Logging ;
77using Microsoft . AspNetCore . Builder ;
88using Microsoft . AspNetCore . Hosting ;
9+ using Microsoft . AspNetCore . Mvc ;
910using Microsoft . Extensions . DependencyInjection ;
1011using Microsoft . Extensions . Logging ;
1112
@@ -21,7 +22,10 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
2122 DbContextOptionsConfigurer . Configure ( options . DbContextOptions , options . ConnectionString ) ;
2223 } ) ;
2324
24- services . AddMvc ( ) ;
25+ services . AddMvc ( options =>
26+ {
27+ options . Filters . Add ( new AutoValidateAntiforgeryTokenAttribute ( ) ) ;
28+ } ) ;
2529
2630 //Configure Abp and Dependency Injection
2731 return services . AddAbp < AbpProjectNameWebModule > ( options =>
You can’t perform that action at this time.
0 commit comments