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