Skip to content

Commit 45e86fe

Browse files
committed
添加scrf忽略提示
1 parent 47b31f2 commit 45e86fe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040

4141
> 注意:
4242
43-
> 1. Laravel 5 默认启用了 CRSF 中间件,因为微信的消息是 POST 过来,所以会触发 CRSF 检查导致无法正确响应消息,所以请去除默认的 CRSF 中间件,改成路由中间件。可以参考我的写法:[overtrue gist:Kernel.php](https://gist.github.com/overtrue/ff6cd3a4e869fbaf6c01#file-kernel-php-L31)
43+
> 1. Laravel 5 默认启用了 CSRF 中间件,因为微信的消息是 POST 过来,所以会触发 CRSF 检查导致无法正确响应消息,所以请去除默认的 CRSF 中间件,改成路由中间件。可以参考我的写法:[overtrue gist:Kernel.php](https://gist.github.com/overtrue/ff6cd3a4e869fbaf6c01#file-kernel-php-L31)
44+
> 5.1 里的 SCRF 已经带了可忽略部分url的功能,你可以参考:http://laravel.com/docs/master/routing#csrf-protection
4445
4546
所有的Wechat对象都已经放到了容器中,直接从容器中取就好。
4647

src/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function boot()
6767
*/
6868
public function register()
6969
{
70-
if (config('wechat.alias')) {
70+
if (config('wechat.use_alias')) {
7171
Alias::register();
7272
}
7373

0 commit comments

Comments
 (0)