Refactor authentication and streaming cookie handling: implement secure cookie logic based on environment in AuthEndpoints and StreamingEndpoints, enhance rate limiting policy in Program.cs, and update logging configuration in appsettings.json. Fix validation behavior to use asynchronous validation methods and improve error handling in frontend components.
This commit is contained in:
@@ -20,10 +20,10 @@ public sealed class ValidationBehavior<TRequest, TResponse>(
|
||||
return await next();
|
||||
|
||||
var context = new ValidationContext<TRequest>(request);
|
||||
var failures = validators
|
||||
.Select(v => v.Validate(context))
|
||||
.SelectMany(r => r.Errors)
|
||||
.ToList();
|
||||
var results = await Task.WhenAll(
|
||||
validators.Select(v => v.ValidateAsync(context, cancellationToken))
|
||||
);
|
||||
var failures = results.SelectMany(r => r.Errors).ToList();
|
||||
|
||||
if (failures.Count == 0)
|
||||
return await next();
|
||||
|
||||
Reference in New Issue
Block a user