/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Shared/AntiforgeryMetadata.cs
13 строк
570 B
Safia Abdalla
Add support for anti-forgery middleware (#49233)
20 июл 2023, 04:01
Не верифицирован
20 июл 2023, 04:01
ab24f14
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.AspNetCore.Antiforgery; namespace Microsoft.AspNetCore.Http.Metadata; internal sealed class AntiforgeryMetadata(bool required) : IAntiforgeryMetadata { public static readonly IAntiforgeryMetadata ValidationRequired = new AntiforgeryMetadata(true); public static readonly IAntiforgeryMetadata ValidationNotRequired = new AntiforgeryMetadata(false); public bool RequiresValidation { get; } = required; }