summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-02-14 09:53:37 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-02-28 21:26:34 +0100
commitd4a282751d6161c34403a5b34e569ebddbf5a0ca (patch)
treeed5338a21693c24f798144ce582a26d3ba43104e /config
parent79a5e7fb539dc6df7de590efb69fb9ab9d4614eb (diff)
downloadgitlab-ce-d4a282751d6161c34403a5b34e569ebddbf5a0ca.tar.gz
Merge branch '4879-support-private-https-urls-for-object-storage' into 'master'
Resolve ""Support private HTTPS urls for object storage"" Closes #4879 See merge request gitlab-org/gitlab-ee!4475
Diffstat (limited to 'config')
-rw-r--r--config/initializers/fog_google_https_private_urls.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/config/initializers/fog_google_https_private_urls.rb b/config/initializers/fog_google_https_private_urls.rb
new file mode 100644
index 00000000000..f92e623a5d2
--- /dev/null
+++ b/config/initializers/fog_google_https_private_urls.rb
@@ -0,0 +1,20 @@
+#
+# Monkey patching the https support for private urls
+# See https://gitlab.com/gitlab-org/gitlab-ee/issues/4879
+#
+module Fog
+ module Storage
+ class GoogleXML
+ class File < Fog::Model
+ module MonkeyPatch
+ def url(expires)
+ requires :key
+ collection.get_https_url(key, expires)
+ end
+ end
+
+ prepend MonkeyPatch
+ end
+ end
+ end
+end