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 6
6
using Castle . Facilities . Logging ;
7
7
using Microsoft . AspNetCore . Builder ;
8
8
using Microsoft . AspNetCore . Hosting ;
9
+ using Microsoft . AspNetCore . Mvc ;
9
10
using Microsoft . Extensions . DependencyInjection ;
10
11
using Microsoft . Extensions . Logging ;
11
12
@@ -21,7 +22,10 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
21
22
DbContextOptionsConfigurer . Configure ( options . DbContextOptions , options . ConnectionString ) ;
22
23
} ) ;
23
24
24
- services . AddMvc ( ) ;
25
+ services . AddMvc ( options =>
26
+ {
27
+ options . Filters . Add ( new AutoValidateAntiforgeryTokenAttribute ( ) ) ;
28
+ } ) ;
25
29
26
30
//Configure Abp and Dependency Injection
27
31
return services . AddAbp < AbpProjectNameWebModule > ( options =>
You can’t perform that action at this time.
0 commit comments