diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-03-05 20:43:48 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2023-03-05 20:46:56 +0100 |
commit | 7623e181247b4d2227b7774143514f6e1ca9253b (patch) | |
tree | b9a82790b7cb1f075769e7e5ca757b2ede322620 /config/initializers | |
parent | bb4e211c86270de6de8a78da96295208ee77dce1 (diff) | |
parent | dfa9843ac85d04e1facb2f757fd9288d8bb9fb2c (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `README.md`: Upstream README has been changed, but we have a completely different one. Kept our `README.md`. - `lib/sanitize_ext/sanitize_config.rb`: Upstream added support for more incoming HTML tags (a large subset of what glitch-soc accepts). Change the code style to match upstream's but otherwise do not change our code. - `spec/lib/sanitize_config_spec.rb`: Upstream added support for more incoming HTML tags (a large subset of what glitch-soc accepts). Kept our version, since the tests are mostly glitch-soc's, except for cases which are purposefuly different.
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/paperclip.rb | 6 | ||||
-rw-r--r-- | config/initializers/redis.rb | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb index a2285427c..9282c941d 100644 --- a/config/initializers/paperclip.rb +++ b/config/initializers/paperclip.rb @@ -90,6 +90,12 @@ if ENV['S3_ENABLED'] == 'true' ) end + if ENV.has_key?('S3_STORAGE_CLASS') + Paperclip::Attachment.default_options[:s3_headers].merge!( + 'X-Amz-Storage-Class' => ENV['S3_STORAGE_CLASS'] + ) + end + # Some S3-compatible providers might not actually be compatible with some APIs # used by kt-paperclip, see https://github.com/mastodon/mastodon/issues/16822 if ENV['S3_FORCE_SINGLE_REQUEST'] == 'true' diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb new file mode 100644 index 000000000..f2bbd1e45 --- /dev/null +++ b/config/initializers/redis.rb @@ -0,0 +1 @@ +Redis.sadd_returns_boolean = false |