Engine for adding support to ActiveStorage based on this gist
rails_proxy_blob_url(signed_id: attachment.signed_id, filename: attachment.filename)`
variant = attachment.variant(:medium)
rails_proxy_blob_url(signed_id: attachment.signed_id, variation_key: variant.variation.key, filename: variant.filename)
Add this line to your application's Gemfile:
gem "active_storage_proxy", github: "michelada/active_storage_proxy"
And then execute:
$ bundle
# config/environments/production.rb
config.active_storage_proxy.proxy_urls_expire_in = 1.year
config.active_storage_proxy.proxy_urls_public = true
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.