Merge branch 'dev_aliyun' into dev_tj

merge aliyun
dev_new_shixunsrepository
tangjiang 5 years ago
commit 5414a740a7

@ -10,6 +10,7 @@ class Admins::BaseController < ApplicationController
before_action :require_login, :require_admin!
after_action :rebind_event_if_ajax_render_partial
skip_before_action :check_sign
private

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

Loading…
Cancel
Save