summaryrefslogtreecommitdiff
path: root/lib/gitlab/middleware
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-07-27 12:19:51 -0700
committerStan Hu <stanhu@gmail.com>2018-07-28 14:35:02 -0700
commit22d44ae9a699c418aba442cd99eec8f58d5fa006 (patch)
tree035cd854d43f390b3684e123be74482485e25296 /lib/gitlab/middleware
parenteb2bc7d99a99981150f32ac2469bff29eebbfa19 (diff)
downloadgitlab-ce-22d44ae9a699c418aba442cd99eec8f58d5fa006.tar.gz
Use /-/health instead of breaking /-/liveness
Diffstat (limited to 'lib/gitlab/middleware')
-rw-r--r--lib/gitlab/middleware/basic_health_check.rb (renamed from lib/gitlab/middleware/liveness_health_check.rb)8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/middleware/liveness_health_check.rb b/lib/gitlab/middleware/basic_health_check.rb
index 404c506a08e..f2a03217098 100644
--- a/lib/gitlab/middleware/liveness_health_check.rb
+++ b/lib/gitlab/middleware/basic_health_check.rb
@@ -9,20 +9,20 @@
module Gitlab
module Middleware
- class LivenessHealthCheck
+ class BasicHealthCheck
# This can't be frozen because Rails::Rack::Logger wraps the body
# rubocop:disable Style/MutableConstant
- OK_RESPONSE = [200, { 'Content-Type' => 'text/plain' }, ["GitLab is alive"]]
+ OK_RESPONSE = [200, { 'Content-Type' => 'text/plain' }, ["GitLab OK"]]
EMPTY_RESPONSE = [404, { 'Content-Type' => 'text/plain' }, [""]]
# rubocop:enable Style/MutableConstant
- LIVENESS_PATH = '/-/liveness'
+ HEALTH_PATH = '/-/health'
def initialize(app)
@app = app
end
def call(env)
- return @app.call(env) unless env['PATH_INFO'] == LIVENESS_PATH
+ return @app.call(env) unless env['PATH_INFO'] == HEALTH_PATH
request = Rack::Request.new(env)