Sha256: a99168a9f467bbe690a12325726f58313d6681711a3349251a10ee12ac50ae93
Contents?: true
Size: 760 Bytes
Versions: 74
Compression:
Stored size: 760 Bytes
Contents
# frozen_string_literal: true # Take a signed permanent reference for a blob representation 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::Representations::RedirectController < ActiveStorage::Representations::BaseController def show expires_in ActiveStorage.service_urls_expire_in redirect_to @representation.url(disposition: params[:disposition]), allow_other_host: true end end
Version data entries
74 entries across 71 versions & 8 rubygems