The required antiforgery cookie ".AspNetCore.Antiforgery.jqQT4c4FfP4" is not present
swagger调试时,api400,查看日志,内容如下:
2021-02-08 15:45:43.614 +08:00 [ERR] The required antiforgery cookie ".AspNetCore.Antiforgery.jqQT4c4FfP4" is not present.
我没用cookie啊,module也没有cookie的配置,调试了无数遍,终于在stack overflow上找到了答案,
链接:https://stackoverflow.com/questions/49790944/asp-net-core-web-the-required-antiforgery-cookie-aspnetcore-antiforgery-wrfs/51328469
清一下浏览器的cookie,立刻解决了,原来之前我有用到cookie。