Skip to content

Commit

Permalink
Avoid overloading X-Accel-Redirect-* header
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisroos committed Aug 15, 2017
1 parent 059df05 commit 31b10a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/media_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def download
send_data(body.read, **AssetManager.content_disposition.options_for(asset))
elsif proxy_via_nginx?
url = Services.cloud_storage.presigned_url_for(asset)
headers['X-Accel-Redirect-URL'] = url
headers['X-Accel-Redirect-Host'] = URI.parse(url).host
headers['X-Cloud-Storage-URL'] = url
headers['X-Cloud-Storage-Host'] = URI.parse(url).host
headers['X-Accel-Redirect'] = "/cloud-storage-proxy/"
render :nothing => true
else
Expand Down

0 comments on commit 31b10a8

Please sign in to comment.