dev_cxt
jingquan huang 5 years ago
parent 7e21719300
commit ff801587c0

@ -24,8 +24,10 @@ class ApplicationController < ActionController::Base
# 所有请求必须合法签名
def check_sign
if params[:client_key]
Rails.logger.info("111111#{params[:client_key]}")
timestamp = params[:timestamp]
sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}")
Rails.logger.info("111111#{sign}")
tip_exception(501, "请求不合理") if sign != params[:client_key]
end
end

Loading…
Cancel
Save