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