fixed get_file request.referer
This commit is contained in:
parent
17c8866d64
commit
fc972a9cad
|
@ -30,6 +30,7 @@ class AttachmentsController < ApplicationController
|
||||||
|
|
||||||
|
|
||||||
def get_file
|
def get_file
|
||||||
|
Rails.logger.info("request.referer===#{request.referer}")
|
||||||
normal_status(-1, "参数缺失") if params[:download_url].blank?
|
normal_status(-1, "参数缺失") if params[:download_url].blank?
|
||||||
url = base_url.starts_with?("https:") ? params[:download_url].to_s.gsub("http:", "https:") : params[:download_url].to_s
|
url = base_url.starts_with?("https:") ? params[:download_url].to_s.gsub("http:", "https:") : params[:download_url].to_s
|
||||||
md5_file = Digest::MD5.hexdigest(params[:download_url])
|
md5_file = Digest::MD5.hexdigest(params[:download_url])
|
||||||
|
|
Loading…
Reference in New Issue