Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Chojnacki <pawel@chojnacki.ws>2017-04-07 13:27:15 +0300
committerDouwe Maan <douwe@gitlab.com>2017-04-07 13:27:15 +0300
commitc3e43c9ba38f8cc0f2fd4a918d052c3977a93421 (patch)
tree3c5e09e7955663f69573ee9f47e9344011993532 /app/controllers/health_check_controller.rb
parent15e87cea3a374e8d929c28f6843170b182fe159a (diff)
Add /-/readiness /-/liveness and /-/health_metrics endpoints to track application readiness
Diffstat (limited to 'app/controllers/health_check_controller.rb')
-rw-r--r--app/controllers/health_check_controller.rb21
1 files changed, 1 insertions, 20 deletions
diff --git a/app/controllers/health_check_controller.rb b/app/controllers/health_check_controller.rb
index 037da7d2bce..5d3109b7187 100644
--- a/app/controllers/health_check_controller.rb
+++ b/app/controllers/health_check_controller.rb
@@ -1,22 +1,3 @@
class HealthCheckController < HealthCheck::HealthCheckController
- before_action :validate_health_check_access!
-
- private
-
- def validate_health_check_access!
- render_404 unless token_valid?
- end
-
- def token_valid?
- token = params[:token].presence || request.headers['TOKEN']
- token.present? &&
- ActiveSupport::SecurityUtils.variable_size_secure_compare(
- token,
- current_application_settings.health_check_access_token
- )
- end
-
- def render_404
- render file: Rails.root.join('public', '404'), layout: false, status: '404'
- end
+ include RequiresHealthToken
end