diff --git a/Backend/MotoresArgentinosV2.API/Controllers/AuthController.cs b/Backend/MotoresArgentinosV2.API/Controllers/AuthController.cs index c4defc8..b1fe8b5 100644 --- a/Backend/MotoresArgentinosV2.API/Controllers/AuthController.cs +++ b/Backend/MotoresArgentinosV2.API/Controllers/AuthController.cs @@ -34,7 +34,7 @@ public class AuthController : ControllerBase HttpOnly = true, // Seguridad: JS no puede leer esto Expires = expires, Secure = true, // Solo HTTPS (Para tests locales 'Secure = false' temporalmente) - SameSite = SameSiteMode.Strict, // Protección CSRF (Strict para máxima seguridad, pero puede ser Lax si hay problemas con redirecciones y testeos locales) + SameSite = SameSiteMode.Strict,//SameSiteMode.Strict, Protección CSRF (Strict para máxima seguridad) - (Para tests locales SameSiteMode.Lax temporalmente) IsEssential = true }; Response.Cookies.Append(cookieName, token, cookieOptions); diff --git a/Backend/MotoresArgentinosV2.API/Program.cs b/Backend/MotoresArgentinosV2.API/Program.cs index 7a48747..375f3f2 100644 --- a/Backend/MotoresArgentinosV2.API/Program.cs +++ b/Backend/MotoresArgentinosV2.API/Program.cs @@ -233,13 +233,6 @@ app.Use(async (context, next) => context.Response.Headers.Append("Access-Control-Allow-Private-Network", "true"); } - // Permitir que la petición OPTIONS pase sin más checks - if (context.Request.Method == "OPTIONS") - { - context.Response.StatusCode = 204; // No Content - return; - } - await next(); }); app.UseCors("AllowSpecificOrigin"); diff --git a/Backend/MotoresArgentinosV2.Core/DTOs/AdDtos.cs b/Backend/MotoresArgentinosV2.Core/DTOs/AdDtos.cs index abcff98..ebc6b64 100644 --- a/Backend/MotoresArgentinosV2.Core/DTOs/AdDtos.cs +++ b/Backend/MotoresArgentinosV2.Core/DTOs/AdDtos.cs @@ -42,7 +42,7 @@ public class CreateAdRequestDto public string Currency { get; set; } = "ARS"; [StringLength(1000, ErrorMessage = "La descripción no puede superar los 1000 caracteres.")] - [RegularExpression(@"^(?!.*