lanrion / weixin_rails_middleware

微信集成 ruby weixin_rails_middleware for integration weixin.
MIT License
408 stars 107 forks source link

Filter chain halted as :check_weixin_legality rendered or redirected #55

Closed zgt0109 closed 6 years ago

zgt0109 commented 7 years ago

Started GET "/weixin/cdfmulkvwatasbbuqj2iuuwfcdrmjk3greuibzkial0?signature=b22be15e6264f93c513a4e92371ebe1e42acc132&echostr=4388870053512687609&timestamp=1488519361&nonce=2011909813" for 127.0.0.1 at 2017-03-03 13:36:01 +0800 Processing by WeixinRailsMiddleware::WeixinController#index as / Parameters: {"signature"=>"b22be15e6264f93c513a4e92371ebe1e42acc132", "echostr"=>"4388870053512687609", "timestamp"=>"1488519361", "nonce"=>"2011909813", "weixin_secret_key"=>"cdfmulkvwatasbbuqj2iuuwfcdrmjk3greuibzkial0"} Merchant Load (0.5ms) SELECT merchants.* FROM merchants WHERE merchants.weixin_secret_key = 'cdfmulkvwatasbbuqj2iuuwfcdrmjk3greuibzkial0' ORDER BY merchants.id ASC LIMIT 1 Rendering text template Rendered text template (0.0ms) Filter chain halted as :check_weixin_legality rendered or redirected Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms)

zgt0109 commented 7 years ago

通过 127.0.0.1:3000/admin 能进后台 通过 XXX.dev/admin 进不去,不知道为什么?

lanrion commented 6 years ago

检查一下签名, 配置之类的.

hugochougt commented 5 years ago

以防有其他同学遇到同样的问题,提供一个我的解决方法。

本地开发如果是用 puma 作为服务器(例如 Rails 5.1),在沙盒账号上配置服务器前临时切换城 webrick。用 rails server webrick 启动本地服务器即可。

这样就不会出现配置失败的提示了,console 也不会打印 "Filter chain halted as :check_weixin_legality rendered or redirected" 这个信息