feat: Implementierung von CSPMiddleware zur Hinzufügung von CSP-Headern mit Nonce für verbesserte Sicherheit.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
|
||||
namespace DigitalData.Core.DTO
|
||||
@@ -63,6 +62,10 @@ namespace DigitalData.Core.DTO
|
||||
return result;
|
||||
}
|
||||
|
||||
public static bool HasFlag(this IEnumerable<Notice> notices, Enum flag) => notices.Any(n => n.Flag?.ToString() == flag.ToString());
|
||||
|
||||
public static bool HasAnyFlag(this IEnumerable<Notice> notices, params Enum[] flags) => flags.Any(f => notices.HasFlag(f));
|
||||
|
||||
public static I Then<I>(this Result result, Func<I> Success, Func<List<string>, List<Notice>, I> Fail)
|
||||
{
|
||||
return result.IsSuccess ? Success() : Fail(result.Messages, result.Notices);
|
||||
|
||||
Reference in New Issue
Block a user