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。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM