1、既然你提交 form 有 csrf 的问题,说明你并没有用到 webview, 也就是直接使用 http 进行交互。那么你的请求是不会带 cookies 的
2、csrf token 的生成是跟 cookies 有关的,你直接 get 方式,是可以拿到 token,只不过这个 token 是无效的。再次 post 时只会报402
建议:
对该接口关闭 csrf
使用 Oauth2 来解决安全问题
You need to Sign in before reply, if you don't have an account, please Sign up first.