about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-06-30 23:58:02 +0200
committerGitHub <noreply@github.com>2020-06-30 23:58:02 +0200
commit7aaf2b44ec698fd4f20b927fcac7edc0394a2647 (patch)
tree036b96777e1f525b2b76aab36204dee30cfa3345 /config
parent65506bac3f3fe233b5b7b3241020bd74eb5c9259 (diff)
Fix remote files not using Content-Type header, streaming (#14184)
Diffstat (limited to 'config')
-rw-r--r--config/application.rb2
-rw-r--r--config/initializers/paperclip.rb1
2 files changed, 3 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb
index 8348649df..a1da9d61f 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -9,10 +9,12 @@ Bundler.require(*Rails.groups)
 require_relative '../app/lib/exceptions'
 require_relative '../lib/paperclip/url_generator_extensions'
 require_relative '../lib/paperclip/attachment_extensions'
+require_relative '../lib/paperclip/media_type_spoof_detector_extensions'
 require_relative '../lib/paperclip/lazy_thumbnail'
 require_relative '../lib/paperclip/gif_transcoder'
 require_relative '../lib/paperclip/video_transcoder'
 require_relative '../lib/paperclip/type_corrector'
+require_relative '../lib/paperclip/response_with_limit_adapter'
 require_relative '../lib/mastodon/snowflake'
 require_relative '../lib/mastodon/version'
 require_relative '../lib/devise/two_factor_ldap_authenticatable'
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb
index ebb009065..b4849370d 100644
--- a/config/initializers/paperclip.rb
+++ b/config/initializers/paperclip.rb
@@ -1,6 +1,7 @@
 # frozen_string_literal: true
 
 Paperclip::DataUriAdapter.register
+Paperclip::ResponseWithLimitAdapter.register
 
 Paperclip.interpolates :filename do |attachment, style|
   if style == :original