您好,欢迎来到伴沃教育。
搜索
您的当前位置:首页VerifyCsrfToken

VerifyCsrfToken

来源:伴沃教育

Cross-site request forgeries are a type of malicious exploit whereby

unauthorized commands are performed on behalf of the authenticated

user.

Allowing users to submit your form from an iframe on a different

domain is exactly the kind of thing Laravels CSRF protection is trying

to prevent.

There is a way to disable CSRF verification for certain URL's. You can add a new item to the$exceptarray to exclude that url from CSRF verification.

Http/Middleware/VerifyCsrfToken.php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;

class VerifyCsrfToken extends BaseVerifier

{

/**

* The URIs that should be excluded from CSRF verification.

*

* @var array

*/

protected $except = [

'your/uri'

];

}

Copyright © 2019- bangwoyixia.com 版权所有 湘ICP备2023022004号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务