dev_tpm_ui
daiao 5 years ago
parent 1d43efcdd1
commit d81387c8e7

@ -27,7 +27,8 @@ class ApplicationController < ActionController::Base
if params[:client_key].present? if params[:client_key].present?
Rails.logger.info("111111 #{params[:client_key]}") Rails.logger.info("111111 #{params[:client_key]}")
Rails.logger.info("00000 #{params[:timestamp]}") Rails.logger.info("00000 #{params[:timestamp]}")
tip_exception(501, "请求超时") if (Time.now - params[:timestamp].to_i).between(0,5) Rails.logger.info("Time.now - params[:timestamp].to_i: #{Time.now - params[:timestamp].to_i}")
tip_exception(501, "请求超时") unless (Time.now - params[:timestamp].to_i).between(0,5)
timestamp = params[:timestamp] timestamp = params[:timestamp]
sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}") sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}")
Rails.logger.info("2222 #{sign}") Rails.logger.info("2222 #{sign}")

Loading…
Cancel
Save