summaryrefslogtreecommitdiff
path: root/lib/object_storage/config.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/object_storage/config.rb')
-rw-r--r--lib/object_storage/config.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/object_storage/config.rb b/lib/object_storage/config.rb
index f933d4e4866..82d9fc07043 100644
--- a/lib/object_storage/config.rb
+++ b/lib/object_storage/config.rb
@@ -84,13 +84,16 @@ module ObjectStorage
def fog_attributes
@fog_attributes ||= begin
- return {} unless enabled? && aws?
- return {} unless server_side_encryption.present?
+ return {} unless aws_server_side_encryption_enabled?
aws_server_side_encryption_headers.compact
end
end
+ def aws_server_side_encryption_enabled?
+ aws? && server_side_encryption.present?
+ end
+
private
# This returns a Hash of HTTP encryption headers to send along to S3.