diff --git a/config/initializers/s3.rb b/config/initializers/s3.rb index bd851618e..38ca5ce08 100644 --- a/config/initializers/s3.rb +++ b/config/initializers/s3.rb @@ -6,9 +6,14 @@ AWS_SECRET_ACCESS_KEY = ENV['AWS_SECRET_ACCESS_KEY'] AWS_BUCKET = ENV['AWS_BUCKET'] AWS_REGION = ENV['AWS_REGION'] +AWS_ENDPOINT = ENV['AWS_ENDPOINT'] || ENV['AWS_ENDPOINT_URL_S3'] +AWS_FORCE_PATH_STYLE = ENV['AWS_FORCE_PATH_STYLE'].in?(%w[true t 1]) AWS_CLIENT_OPTIONS = { access_key_id: AWS_ACCESS_KEY_ID, secret_access_key: AWS_SECRET_ACCESS_KEY, region: AWS_REGION, -}.freeze + endpoint: AWS_ENDPOINT, + force_path_style: AWS_FORCE_PATH_STYLE, +}.compact_blank + .freeze