Sha256: 499ce0751a8dc1e2c2696a9a51702c16811a256586c47f5c80a5ca9f860b167b

Contents?: true

Size: 754 Bytes

Versions: 18

Compression:

Stored size: 754 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

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

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.5.1/app/controllers/active_storage/representations/proxy_controller.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.5.1/app/controllers/active_storage/representations/proxy_controller.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/activestorage-7.0.5.1/app/controllers/active_storage/representations/proxy_controller.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activestorage-7.0.3.1/app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.8 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.7.2 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.7.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.7 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.6 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.5.1 app/controllers/active_storage/representations/proxy_controller.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activestorage-7.0.3.1/app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.5 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.4.3 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.4.2 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.4.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.4 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.3.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.3 app/controllers/active_storage/representations/proxy_controller.rb