summaryrefslogtreecommitdiff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2019-05-16 09:32:25 +0000
committerNick Thomas <nick@gitlab.com>2019-05-16 09:32:25 +0000
commit3c33724e2e182436a2d8b44ef71d0bdac37c585b (patch)
treeddf7bd94e5981ca34da591afd993cdaa5f45b283 /app/controllers/admin
parentc841c8771b8d69034c1ceb6e452746d193865cb0 (diff)
downloadgitlab-ce-3c33724e2e182436a2d8b44ef71d0bdac37c585b.tar.gz
Add Let's Encrypt client
Part of adding Let's Encrypt certificates for pages domains Add acme-client gem Client is being initialized by private key stored in secrets.yml Let's Encrypt account is being created lazily. If it's already created, Acme::Client just gets account_kid by calling new_account method Make Let's Encrypt client an instance Wrap order and challenge classes
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/application_settings_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb
index d445be0eb19..d5bc723aa8c 100644
--- a/app/controllers/admin/application_settings_controller.rb
+++ b/app/controllers/admin/application_settings_controller.rb
@@ -89,6 +89,13 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
)
end
+ # Getting ToS url requires `directory` api call to Let's Encrypt
+ # which could result in 500 error/slow rendering on settings page
+ # Because of that we use separate controller action
+ def lets_encrypt_terms_of_service
+ redirect_to ::Gitlab::LetsEncrypt.terms_of_service_url
+ end
+
private
def set_application_setting