diff options
| author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-07 16:54:37 +0100 |
|---|---|---|
| committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-07 21:49:45 +0100 |
| commit | 5da2f42dc9609c07fd60d9d1c7a2302353a820c0 (patch) | |
| tree | 79d13b23dfdca03f6bcccc4a1ba5c7574df1b145 /app/controllers/concerns | |
| parent | 829e452588575c634b2a3dd778e702a6b21465e1 (diff) | |
| download | gitlab-ce-5da2f42dc9609c07fd60d9d1c7a2302353a820c0.tar.gz | |
backport: Always proxy reports downloadsalways-proxy-reports
This makes to always proxy reports
Diffstat (limited to 'app/controllers/concerns')
| -rw-r--r-- | app/controllers/concerns/send_file_upload.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/concerns/send_file_upload.rb b/app/controllers/concerns/send_file_upload.rb index 0bb7b7efed0..515a9eede8e 100644 --- a/app/controllers/concerns/send_file_upload.rb +++ b/app/controllers/concerns/send_file_upload.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module SendFileUpload - def send_upload(file_upload, send_params: {}, redirect_params: {}, attachment: nil, disposition: 'attachment') + def send_upload(file_upload, send_params: {}, redirect_params: {}, attachment: nil, proxy: false, disposition: 'attachment') if attachment # Response-Content-Type will not override an existing Content-Type in # Google Cloud Storage, so the metadata needs to be cleared on GCS for @@ -17,7 +17,7 @@ module SendFileUpload if file_upload.file_storage? send_file file_upload.path, send_params - elsif file_upload.class.proxy_download_enabled? + elsif file_upload.class.proxy_download_enabled? || proxy headers.store(*Gitlab::Workhorse.send_url(file_upload.url(**redirect_params))) head :ok else |
