aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/lib/active_storage
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-06-21 11:06:32 -0400
committerGeorge Claghorn <george@basecamp.com>2018-06-21 11:06:32 -0400
commitb21f50d8ae36d9b50b673579e17bccbe55363b34 (patch)
treea7fb19013b31f654d198196ad2566e74e103eba1 /activestorage/lib/active_storage
parent9ee74265991e0e52e549e08c25e968195a4a880c (diff)
downloadrails-b21f50d8ae36d9b50b673579e17bccbe55363b34.tar.gz
rails-b21f50d8ae36d9b50b673579e17bccbe55363b34.tar.bz2
rails-b21f50d8ae36d9b50b673579e17bccbe55363b34.zip
Permit configuring the default service URL expiry
Diffstat (limited to 'activestorage/lib/active_storage')
-rw-r--r--activestorage/lib/active_storage/engine.rb1
-rw-r--r--activestorage/lib/active_storage/service.rb2
2 files changed, 1 insertions, 2 deletions
diff --git a/activestorage/lib/active_storage/engine.rb b/activestorage/lib/active_storage/engine.rb
index 519b9ae283..93c5c55b95 100644
--- a/activestorage/lib/active_storage/engine.rb
+++ b/activestorage/lib/active_storage/engine.rb
@@ -54,6 +54,7 @@ module ActiveStorage
ActiveStorage.variable_content_types = app.config.active_storage.variable_content_types || []
ActiveStorage.content_types_to_serve_as_binary = app.config.active_storage.content_types_to_serve_as_binary || []
+ ActiveStorage.service_urls_expire_in = app.config.active_storage.service_urls_expire_in || 5.minutes
end
end
diff --git a/activestorage/lib/active_storage/service.rb b/activestorage/lib/active_storage/service.rb
index da1af4f745..fe3ef7503a 100644
--- a/activestorage/lib/active_storage/service.rb
+++ b/activestorage/lib/active_storage/service.rb
@@ -39,8 +39,6 @@ module ActiveStorage
extend ActiveSupport::Autoload
autoload :Configurator
- class_attribute :url_expires_in, default: 5.minutes
-
class << self
# Configure an Active Storage service by name from a set of configurations,
# typically loaded from a YAML file. The Active Storage engine uses this