Sha256: bfc85e2d6dc74cedfbbfaa7dbc3e7f4b8c1f39bdceb4fe203f170e31e6e400c1

Contents?: true

Size: 718 Bytes

Versions: 9

Compression:

Stored size: 718 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
  def show
    http_cache_forever public: true do
      send_blob_stream @representation.image, disposition: params[:disposition]
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activestorage-7.0.2.3/app/controllers/active_storage/representations/proxy_controller.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activestorage-7.0.2.3/app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.2.4 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.2.3 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.2.2 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.2.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.2 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-7.0.0 app/controllers/active_storage/representations/proxy_controller.rb