File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
eFormAPI/eFormAPI/App_Start Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 44using System . Net . Http . Headers ;
55using System . Reflection ;
66using System . Web . Http ;
7+ using System . Web . Http . Cors ;
78using System . Web . Http . Dispatcher ;
89using Autofac . Integration . WebApi ;
910using eFormAPI . Web . Infrastructure . Helpers ;
@@ -20,7 +21,8 @@ public static void Register(HttpConfiguration config)
2021 {
2122 // Web API configuration and services
2223 // Configure Web API to use only bearer token authentication.
23- config . EnableCors ( ) ;
24+ var corsAttr = new EnableCorsAttribute ( "*" , "*" , "*" ) ;
25+ config . EnableCors ( corsAttr ) ;
2426 config . SuppressDefaultHostAuthentication ( ) ;
2527 config . Filters . Add ( new HostAuthenticationFilter ( OAuthDefaults . AuthenticationType ) ) ;
2628 config . Filters . Add ( new HostAuthenticationFilter ( CookieAuthenticationDefaults . AuthenticationType ) ) ;
You can’t perform that action at this time.
0 commit comments