去掉验证的过滤

dev_new_shixunsrepository
cxt 5 years ago
parent 1731f277e0
commit 87db175195

@ -23,11 +23,11 @@ class ApplicationController < ActionController::Base
# 所有请求必须合法签名
def check_sign
if !Rails.env.development? && EduSetting.get("host_name") != "https://test-newweb.educoder.net"
if !Rails.env.development?
Rails.logger.info("66666 #{params}")
suffix = request.url.split(".").last.split("?").first
suffix_arr = ["xls", "xlsx", "pdf", "zip"] # excel文件先注释
unless suffix_arr.include?(suffix)
# suffix = request.url.split(".").last.split("?").first
# suffix_arr = ["xls", "xlsx", "pdf", "zip"] # excel文件先注释
# unless suffix_arr.include?(suffix)
if params[:client_key].present?
randomcode = params[:randomcode]
# tip_exception(501, "请求不合理") unless (Time.now.to_i - randomcode.to_i).between?(0,5)
@ -38,7 +38,7 @@ class ApplicationController < ActionController::Base
else
tip_exception(501, "请求不合理")
end
end
# end
end
end

Loading…
Cancel
Save