Updated cors policy
This commit is contained in:
@ -127,8 +127,8 @@ namespace IO.Swagger
|
|||||||
{
|
{
|
||||||
po.AllowAnyHeader()
|
po.AllowAnyHeader()
|
||||||
.WithMethods("GET", "POST")
|
.WithMethods("GET", "POST")
|
||||||
.WithOrigins("http://localhost:*", "https://localhost:*", "http://*.shrukanslab.xyz", "https://*.shrukanslab.xyz")
|
|
||||||
.SetIsOriginAllowedToAllowWildcardSubdomains();
|
.SetIsOriginAllowedToAllowWildcardSubdomains();
|
||||||
|
po.SetIsOriginAllowed((or) => or.Contains("localhost") || or.Contains("shrukanslab"));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -140,6 +140,7 @@ namespace IO.Swagger
|
|||||||
}
|
}
|
||||||
Console.WriteLine(connectionString);
|
Console.WriteLine(connectionString);
|
||||||
services.AddScoped<IUserRepository, UserRepository>();
|
services.AddScoped<IUserRepository, UserRepository>();
|
||||||
|
services.AddScoped<ICurrencyRepository, CurrencyRepository>();
|
||||||
services.AddDbContext<BankDbContext>(x => x.UseSqlServer(connectionString: connectionString));
|
services.AddDbContext<BankDbContext>(x => x.UseSqlServer(connectionString: connectionString));
|
||||||
services.AddSingleton<JwtService>();
|
services.AddSingleton<JwtService>();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user