【发布时间】:2021-02-09 08:55:37
【问题描述】:
我正在使用 .netcore 3.0,目前我有一个 API 可以接受外部(没有 Antiforgery 令牌)和内部(有 Antiforgery 令牌)调用,在这种情况下,我需要在 api 方法上添加 [IgnoreAntiforgeryToken] 和根据请求判断是否检查防伪令牌。
想知道是否有在 api 函数中验证防伪令牌?提前致谢。
【问题讨论】:
标签: asp.net-core model-view-controller .net-core antiforgerytoken