Sha256: a56a61cf32af23b34375c504428d117d5c56b72cbd08516117049023e42569f8

Contents?: true

Size: 788 Bytes

Versions: 28

Compression:

Stored size: 788 Bytes

Contents

# frozen_string_literal: true

# Proxy files through application. This avoids having a redirect and makes files easier to cache.
#
# 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::Representations::ProxyController < ActiveStorage::Representations::BaseController
  include ActiveStorage::Streaming
  include ActiveStorage::DisableSession

  def show
    http_cache_forever public: true do
      send_blob_stream @representation, disposition: params[:disposition]
    end
  end
end

Version data entries

28 entries across 28 versions & 4 rubygems

Version Path
activestorage-8.0.0 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.2.2 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.1.5 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-8.0.0.rc2 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.2.1.2 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.1.4.2 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-8.0.0.rc1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.2.1.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.1.4.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-8.0.0.beta1 app/controllers/active_storage/representations/proxy_controller.rb
omg-activestorage-8.0.0.alpha9 app/controllers/active_storage/representations/proxy_controller.rb
omg-activestorage-8.0.0.alpha8 app/controllers/active_storage/representations/proxy_controller.rb
omg-activestorage-8.0.0.alpha7 app/controllers/active_storage/representations/proxy_controller.rb
omg-activestorage-8.0.0.alpha4 app/controllers/active_storage/representations/proxy_controller.rb
omg-activestorage-8.0.0.alpha3 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.1.4 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.2.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.2.0 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.2.0.rc1 app/controllers/active_storage/representations/proxy_controller.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/activestorage-7.1.3.4/app/controllers/active_storage/representations/proxy_controller.rb