|
|
@ -29,7 +29,7 @@ class ApplicationController < ActionController::Base
|
|
|
|
unless suffix_arr.include?(suffix)
|
|
|
|
unless suffix_arr.include?(suffix)
|
|
|
|
if params[:client_key].present?
|
|
|
|
if params[:client_key].present?
|
|
|
|
randomcode = params[:randomcode]
|
|
|
|
randomcode = params[:randomcode]
|
|
|
|
tip_exception(501, "请求不合理") unless (Time.now.to_i - randomcode.to_i).between?(0,5)
|
|
|
|
# tip_exception(501, "请求不合理") unless (Time.now.to_i - randomcode.to_i).between?(0,5)
|
|
|
|
|
|
|
|
|
|
|
|
sign = Digest::MD5.hexdigest("#{OPENKEY}#{randomcode}")
|
|
|
|
sign = Digest::MD5.hexdigest("#{OPENKEY}#{randomcode}")
|
|
|
|
Rails.logger.info("2222 #{sign}")
|
|
|
|
Rails.logger.info("2222 #{sign}")
|
|
|
|