2016-12-17 15:09:44 0 评论 Yii 2.0 Boy.Lee

Yii 2 微信开发收不到post请求

{ 1. 查看服务器request log }

可以找到请求已经发过来了

101.226.233.152 - - [17/Dec/2016:14:56:56 +0800] "POST xxxx/xx/w-c?signature=xx&timestamp=xxxx&nonce=xxx&openid=xxx HTTP/1.1" 400 1292 "-" "Mozilla/4.0"

 

{ 2. postman test post 接口 }

拿到了400,仔细一想这不是csrf验证失败嘛,可以参照 <<YII 2.0 针对特定 ACTION关闭CSRF验证>>进行关闭相关验证

Bad Request (#400)

Unable to verify your data submission.
The above error occurred while the Web server was processing your request.

Please contact us if you think this is a server error. Thank you.