Laravel默认为disablesVerifyCsrfToken中间件如果正在运行测试。因此我没有注意到api路由需要csrf令牌才能成功。有没有办法让它恢复一些测试?像 function withVerifyCsrfTokenMiddleware()
{
$this->app... // here we're passing something to the app
}
,并
试图在最新的Spring Boot上实现CSRF保护。 互联网上的所有例子都基于用户登录和身份验证,我不需要这些。 我的网站没有任何要求验证的部分。 我想 1) Rest requests come from within site. No direct request from outside with wget to be allowed. 2) All pages (routes) must