来自instamojo的响应已成功提取,但问题是,web钩子服务不起作用。在这方面,我在请求中提供了一个web钩子url,并且我想排除CSRF验证,因为我已经在中间件中包含了除了'instamojo/*'之外的数组,但仍然没有任何用处。
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'instamojo/*',
];
} 目前的路线
Route::post('webhook','HomeController@webhook');发布于 2018-06-23 06:09:26
它可以通过在中间件的“例外”部分添加投递路由名称来解决。在这里,我在中间件中添加了webhook/*。
路由
Route::post('webhook','HomeController@webhook');中间件
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'webhook/*',
];
}这是工作的fine.Thank你。
https://stackoverflow.com/questions/50602643
复制相似问题