Sha256: 0586201e2753f8d50baa9151ccd41693954a73353e2ebf3880c42905faba08d3

Contents?: true

Size: 419 Bytes

Versions: 24

Compression:

Stored size: 419 Bytes

Contents

# frozen_string_literal: true

# Proxy files through application. This avoids having a redirect and makes files easier to cache.
class ActiveStorage::Representations::ProxyController < ActiveStorage::Representations::BaseController
  include ActiveStorage::SetHeaders

  def show
    http_cache_forever public: true do
      set_content_headers_from @representation.image
      stream @representation
    end
  end
end

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/activestorage-6.1.6.1/app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.7.6 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.7.5 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.7.4 app/controllers/active_storage/representations/proxy_controller.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/activestorage-6.1.6.1/app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.7.3 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.7.2 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.7.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.7 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.6.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.6 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.5.1 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.5 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.4.7 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.4.6 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.4.5 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.4.4 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.4.3 app/controllers/active_storage/representations/proxy_controller.rb
activestorage-6.1.4.2 app/controllers/active_storage/representations/proxy_controller.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/activestorage-6.1.4.1/app/controllers/active_storage/representations/proxy_controller.rb