Skip to content

Commit 19c8064

Browse files
authored
Update README.md
1 parent b9030e6 commit 19c8064

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ WECHAT_ENABLE_MOCK
8787
1. Laravel 5 起默认启用了 CSRF 中间件,因为微信的消息是 POST 过来,所以会触发 CSRF 检查导致无法正确响应消息,所以请去除默认的 CSRF 中间件,改成路由中间件。可以参考我的写法:[overtrue gist:Kernel.php](https://gist.github.com/overtrue/ff6cd3a4e869fbaf6c01#file-kernel-php-L31)
8888
2. 5.1 里的 CSRF 已经带了可忽略部分url的功能,你可以参考:http://laravel.com/docs/master/routing#csrf-protection
8989

90-
### Laravel 5.2
90+
### Laravel 5.2+
9191

92-
Laravel 5.2 默认启用了 web 中间件,意味着 CSRF 会默认打开,有两种方案:
92+
Laravel 5.2 以后的版本默认启用了 web 中间件,意味着 CSRF 会默认打开,有两种方案:
9393

9494
1. 在 CSRF 中间件里排除微信相关的路由
9595
2. 关掉 CSRF 中间件(极不推荐)

0 commit comments

Comments
 (0)