first stamp

dev_tpm_ui
jingquan huang 5 years ago
parent 40edd40ab7
commit d7dc0c8648

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

@ -4,4 +4,8 @@ class MainController < ApplicationController
def index
render file: 'public/react/build/index.html', :layout => false
end
def first_stamp
render :json => { status: 0, message: Time.now.to_i }
end
end
Loading…
Cancel
Save