16
16
using AbpCompanyName . AbpProjectName . Identity ;
17
17
18
18
#if FEATURE_SIGNALR
19
- using Owin ;
20
- using Microsoft . Owin . Cors ;
21
19
using Microsoft . AspNet . SignalR ;
22
- using AbpCompanyName . AbpProjectName . Owin ;
20
+ using Microsoft . Owin . Cors ;
21
+ using Owin ;
23
22
using Abp . Owin ;
23
+ using AbpCompanyName . AbpProjectName . Owin ;
24
24
#endif
25
25
26
26
namespace AbpCompanyName . AbpProjectName . Web . Host . Startup
27
27
{
28
28
public class Startup
29
29
{
30
- private const string DefaultCorsPolicyName = "localhost" ;
30
+ private const string _defaultCorsPolicyName = "localhost" ;
31
31
32
32
private readonly IConfigurationRoot _appConfiguration ;
33
33
@@ -41,7 +41,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
41
41
// MVC
42
42
services . AddMvc ( options =>
43
43
{
44
- options . Filters . Add ( new CorsAuthorizationFilterFactory ( DefaultCorsPolicyName ) ) ;
44
+ options . Filters . Add ( new CorsAuthorizationFilterFactory ( _defaultCorsPolicyName ) ) ;
45
45
} ) ;
46
46
47
47
IdentityRegistrar . Register ( services ) ;
@@ -50,7 +50,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
50
50
// Configure CORS for angular2 UI
51
51
services . AddCors ( options =>
52
52
{
53
- options . AddPolicy ( DefaultCorsPolicyName , builder =>
53
+ options . AddPolicy ( _defaultCorsPolicyName , builder =>
54
54
{
55
55
// App:CorsOrigins in appsettings.json can contain more than one address separated by comma.
56
56
builder
@@ -94,7 +94,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
94
94
{
95
95
app . UseAbp ( ) ; // Initializes ABP framework.
96
96
97
- app . UseCors ( DefaultCorsPolicyName ) ; // Enable CORS!
97
+ app . UseCors ( _defaultCorsPolicyName ) ; // Enable CORS!
98
98
99
99
app . UseStaticFiles ( ) ;
100
100
0 commit comments