|
|
@ -45,8 +45,6 @@ namespace MyCompanyName.MyProjectName
|
|
|
|
)]
|
|
|
|
)]
|
|
|
|
public class MyProjectNameIdentityServerModule : AbpModule
|
|
|
|
public class MyProjectNameIdentityServerModule : AbpModule
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private const string DefaultCorsPolicyName = "Default";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var hostingEnvironment = context.Services.GetHostingEnvironment();
|
|
|
|
var hostingEnvironment = context.Services.GetHostingEnvironment();
|
|
|
@ -142,7 +140,7 @@ namespace MyCompanyName.MyProjectName
|
|
|
|
|
|
|
|
|
|
|
|
context.Services.AddCors(options =>
|
|
|
|
context.Services.AddCors(options =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
options.AddPolicy(DefaultCorsPolicyName, builder =>
|
|
|
|
options.AddDefaultPolicy(builder =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
builder
|
|
|
|
builder
|
|
|
|
.WithOrigins(
|
|
|
|
.WithOrigins(
|
|
|
@ -180,7 +178,7 @@ namespace MyCompanyName.MyProjectName
|
|
|
|
app.UseCorrelationId();
|
|
|
|
app.UseCorrelationId();
|
|
|
|
app.UseStaticFiles();
|
|
|
|
app.UseStaticFiles();
|
|
|
|
app.UseRouting();
|
|
|
|
app.UseRouting();
|
|
|
|
app.UseCors(DefaultCorsPolicyName);
|
|
|
|
app.UseCors();
|
|
|
|
app.UseAuthentication();
|
|
|
|
app.UseAuthentication();
|
|
|
|
|
|
|
|
|
|
|
|
if (MultiTenancyConsts.IsEnabled)
|
|
|
|
if (MultiTenancyConsts.IsEnabled)
|
|
|
|