时间:2021-07-01 10:21:17 帮助过:52人阅读
部分页面不需要使用CSRF
/*** 指定页面不开启CSRF* @var string*/ private $openRoutes = ['test/url']; /*** Handle an incoming request.* @param \Illuminate\Http\Request $request* @param \Closure $next* @return mixed*/public function handle($request, Closure $next){ if (in_array($request->path(), $this->openRoutes)) { return $next($request); } return parent::handle($request, $next);}