about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorNishi, Keisuke <k24@users.noreply.github.com>2017-09-30 21:28:29 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-09-30 14:28:29 +0200
commit83ffc4dc07cc619c166b36e2de0b0f0e7424d672 (patch)
treea0aa60540407e54de0c787be1f2d9348814e4309 /config/initializers
parentd6fe0954e319b271f3cfbb85df22aba9102746ac (diff)
Fix Paperclip::Fog always responds Not Found in OpenStack-v2 like ConoHa (#5155)
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/paperclip.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb
index f27aae7ec..85e97a3ce 100644
--- a/config/initializers/paperclip.rb
+++ b/config/initializers/paperclip.rb
@@ -48,6 +48,7 @@ elsif ENV['SWIFT_ENABLED'] == 'true'
       provider: 'OpenStack',
       openstack_username: ENV.fetch('SWIFT_USERNAME'),
       openstack_project_name: ENV.fetch('SWIFT_TENANT'),
+      openstack_tenant: ENV.fetch('SWIFT_TENANT'), # Some OpenStack-v2 ignores project_name but needs tenant
       openstack_api_key: ENV.fetch('SWIFT_PASSWORD'),
       openstack_auth_url: ENV.fetch('SWIFT_AUTH_URL'),
       openstack_domain_name: ENV['SWIFT_DOMAIN_NAME'] || 'default',
@@ -55,7 +56,7 @@ elsif ENV['SWIFT_ENABLED'] == 'true'
       openstack_cache_ttl: ENV['SWIFT_CACHE_TTL'] || 60,
     },
     fog_directory: ENV.fetch('SWIFT_CONTAINER'),
-    fog_host: ENV.fetch('SWIFT_OBJECT_URL'),
+    fog_host: ENV['SWIFT_OBJECT_URL'],
     fog_public: true
   )
 else