Browse Source

fixed get_file request.referer

pull/346/head
xxq250 1 year ago
parent
commit
3229ef5e2e
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      app/controllers/attachments_controller.rb

+ 1
- 0
app/controllers/attachments_controller.rb View File

@@ -30,6 +30,7 @@ class AttachmentsController < ApplicationController


def get_file
Rails.logger.info("request.referer===#{request.referer}")
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
md5_file = Digest::MD5.hexdigest(params[:download_url])


Loading…
Cancel
Save