dev_cxt
jingquan huang 5 years ago
parent 33c67a0544
commit ddface9f8e

@ -23,12 +23,12 @@ class ApplicationController < ActionController::Base
# 所有请求必须合法签名
def check_sign
unless Rails.env.development?
Rails.logger.info("####111111#{request.content_type}, timestamp is #{params[:timestamp]}")
# unless Rails.env.development?
Rails.logger.info("####111111#{request.xhr?}, timestamp is #{params[:timestamp]}")
timestamp = params[:timestamp]
sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}")
tip_exception(501, "请求不合理") if sign != params[:client_key]
end
# end
end
# 全局配置参数

Loading…
Cancel
Save