Feat: Reforma de unificación de bases de datos.
This commit is contained in:
@@ -78,7 +78,7 @@ builder.Services.AddRateLimiter(options =>
|
||||
|
||||
options.AddPolicy("AuthPolicy", context =>
|
||||
{
|
||||
// 🟢 FIX: Si es localhost, SIN LÍMITES
|
||||
// Si es localhost, SIN LÍMITES
|
||||
var remoteIp = context.Connection.RemoteIpAddress;
|
||||
if (System.Net.IPAddress.IsLoopback(remoteIp!))
|
||||
{
|
||||
@@ -97,11 +97,9 @@ builder.Services.AddRateLimiter(options =>
|
||||
});
|
||||
});
|
||||
|
||||
// DB CONTEXTS
|
||||
builder.Services.AddDbContext<InternetDbContext>(options =>
|
||||
options.UseSqlServer(builder.Configuration.GetConnectionString("Internet")));
|
||||
builder.Services.AddDbContext<AutosDbContext>(options =>
|
||||
options.UseSqlServer(builder.Configuration.GetConnectionString("Autos")));
|
||||
// DB CONTEXTS (Legacy unificado en eldia)
|
||||
builder.Services.AddDbContext<EldiaDbContext>(options =>
|
||||
options.UseSqlServer(builder.Configuration.GetConnectionString("eldia")));
|
||||
builder.Services.AddDbContext<MotoresV2DbContext>(options =>
|
||||
options.UseSqlServer(builder.Configuration.GetConnectionString("MotoresV2"),
|
||||
sqlOptions => sqlOptions.EnableRetryOnFailure()));
|
||||
|
||||
Reference in New Issue
Block a user