diff options
author | Starfall <us@starfall.systems> | 2020-11-20 16:54:00 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2020-11-20 16:54:00 -0600 |
commit | 19548d0a4bc303ca8017599577e21a6d522eb7bd (patch) | |
tree | ef4ada7e8138aa510b0d54509e99ba1fc30995bc /config/initializers | |
parent | 383bb3804bdbd6caa442283cc96ef0cdbfdb4575 (diff) | |
parent | 24696458bf22c8529b49f89b2791e3e07583b7e0 (diff) |
Merge branch 'glitch' into main
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/cache_buster.rb | 10 | ||||
-rw-r--r-- | config/initializers/paperclip.rb | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/config/initializers/cache_buster.rb b/config/initializers/cache_buster.rb new file mode 100644 index 000000000..227e450f3 --- /dev/null +++ b/config/initializers/cache_buster.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +Rails.application.configure do + config.x.cache_buster_enabled = ENV['CACHE_BUSTER_ENABLED'] == 'true' + + config.x.cache_buster = { + secret_header: ENV['CACHE_BUSTER_SECRET_HEADER'], + secret: ENV['CACHE_BUSTER_SECRET'], + } +end diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index b841d5220..25adcd8d6 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -107,7 +107,6 @@ elsif ENV['SWIFT_ENABLED'] == 'true' else Paperclip::Attachment.default_options.merge!( storage: :filesystem, - use_timestamp: true, path: File.join(ENV.fetch('PAPERCLIP_ROOT_PATH', File.join(':rails_root', 'public', 'system')), ':prefix_path:class', ':attachment', ':id_partition', ':style', ':filename'), url: ENV.fetch('PAPERCLIP_ROOT_URL', '/system') + '/:prefix_url:class/:attachment/:id_partition/:style/:filename', ) |