FIX: Redirecting to download backup from S3 could fail (#20171)

Follow-up to 008b700a3f
This commit is contained in:
Gerhard Schlager 2023-02-07 15:32:47 +01:00 committed by GitHub
parent 4fee7f43ba
commit 7482b0f703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,7 +84,7 @@ class Admin::BackupsController < Admin::AdminController
StaffActionLogger.new(current_user).log_backup_download(backup) StaffActionLogger.new(current_user).log_backup_download(backup)
if store.remote? if store.remote?
redirect_to backup.source redirect_to backup.source, allow_other_host: true
else else
headers["Content-Length"] = File.size(backup.source).to_s headers["Content-Length"] = File.size(backup.source).to_s
send_file backup.source send_file backup.source