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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-01 03:06:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-01 03:06:42 +0300
commitb38cf7ccdf8b7ca90bce587a1bf4765631733017 (patch)
tree37b157087207cae5ec7b9e028864e859705c07d6 /app/controllers/health_controller.rb
parent08f4ce10c04d705148a7e14556443b9e3aee6821 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/health_controller.rb')
-rw-r--r--app/controllers/health_controller.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/health_controller.rb b/app/controllers/health_controller.rb
index c97057c08cb..84b4932ba7a 100644
--- a/app/controllers/health_controller.rb
+++ b/app/controllers/health_controller.rb
@@ -41,6 +41,10 @@ class HealthController < ActionController::Base
info[:labels] = r.labels if r.labels
[name, info]
end
+
+ # disable static error pages at the gitlab-workhorse level, we want to see this error response even in production
+ headers["X-GitLab-Custom-Error"] = 1 unless success
+
render json: response.to_h, status: success ? :ok : :service_unavailable
end
end