media assets: fix unsafe redirect error in /media_assets/:id/:variant
Fix error when redirecting to image hosted on separate domain.
This commit is contained in:
@@ -41,6 +41,6 @@ class MediaAssetsController < ApplicationController
|
||||
variant = media_asset.variant(params[:variant])
|
||||
raise ActiveRecord::RecordNotFound if variant.nil?
|
||||
|
||||
redirect_to variant.file_url
|
||||
redirect_to variant.file_url, allow_other_host: true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user