Варнинг the 'cache-control' and 'pragma' headers have been overridden and set to 'no-cache, no-store' and 'no-cache'

Ошибка microsoft.aspnetcore.antiforgery.defaultantiforgery[8] the 'cache-control' and 'pragma' headers have been overridden and set to 'no-cache, no-store' and 'no-cache' respectively to prevent caching of this response. any response that uses antiforgery should not be cached.

При отправке кеша он переписывается свойство на no-cache из за варнинга antiforgety token хотя я не отправляю его в кеше и где либо полностью был убран с проекта токен Подскажите в чем косяк и как можно исправить

код кеширования

 public ToDoListModel InfoAboutCache(Guid id)
{
    if (id != null)
    {
        if (_cache.TryGetValue(id, out ToDoListModel? cachedResult))
            return cachedResult!;
        cachedResult =
            _td.ToDo.Include(c => c.Creator)
                .Include(e => e.Performer)
                .FirstOrDefault(t => t.Id == id)!;
        var cacheEntryOptions = new MemoryCacheEntryOptions().SetSlidingExpiration(TimeSpan.FromMinutes(10));
        _cache.Set(id, cachedResult, cacheEntryOptions);
        return cachedResult;
    }

    throw new Exception("нету такого айди");
}

код action контроллера

[HttpGet]
[ResponseCache(CacheProfileName = "caching", Duration = 600 , Location = ResponseCacheLocation.Any )]
public IActionResult About(Guid id)
{
    try
    {
        if (_toDoService.GetAll().Any(p => p.Id == id))
            return View(_toDoService.InfoAboutCache(id));
        return NotFound();
    }
    catch (Exception e)
    {
        Console.WriteLine($"такого айди нету {e}");
        throw;
    }
}

фото ошибки

введите сюда описание изображения

ответ в браузере введите сюда описание изображения


Ответы (0 шт):