Sha256: d2b0f0dca87e27ee8cf79c48e4f6919f769fb8a59f82eb1bc13263e2d31b57bb

Contents?: true

Size: 742 Bytes

Versions: 74

Compression:

Stored size: 742 Bytes

Contents

# frozen_string_literal: true

# Take a signed permanent reference for a blob and turn it into an expiring service URL for download.
#
# WARNING: All Active Storage controllers are publicly accessible by default. The
# generated URLs are hard to guess, but permanent by design. If your files
# require a higher level of protection consider implementing
# {Authenticated Controllers}[https://guides.rubyonrails.org/active_storage_overview.html#authenticated-controllers].
class ActiveStorage::Blobs::RedirectController < ActiveStorage::BaseController
  include ActiveStorage::SetBlob

  def show
    expires_in ActiveStorage.service_urls_expire_in
    redirect_to @blob.url(disposition: params[:disposition]), allow_other_host: true
  end
end

Version data entries

74 entries across 71 versions & 8 rubygems

Version Path
activestorage-8.0.2 app/controllers/active_storage/blobs/redirect_controller.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.8.7/app/controllers/active_storage/blobs/redirect_controller.rb
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/activestorage-7.1.3.4/app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-8.0.1 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-8.0.0.1 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.2.2.1 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.1.5.1 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.0.8.7 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-8.0.0 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.2.2 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.1.5 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-8.0.0.rc2 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.2.1.2 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.1.4.2 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.0.8.6 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-8.0.0.rc1 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.2.1.1 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.1.4.1 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-7.0.8.5 app/controllers/active_storage/blobs/redirect_controller.rb
activestorage-8.0.0.beta1 app/controllers/active_storage/blobs/redirect_controller.rb