From 1d43efcdd1607897e76e199fcbb58f8b568aa6fb Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 30 Dec 2019 16:49:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=90=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3d1fd642e..4daa3b45c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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).between(0,5) timestamp = params[:timestamp] sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}") Rails.logger.info("2222 #{sign}")