diff options
author | Robert Speicher <robert@gitlab.com> | 2018-07-30 20:05:06 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-07-30 20:05:06 +0000 |
commit | 1adfb156e85c270470fb10792cead9ff31b6687c (patch) | |
tree | 05fb3cee1eb9ab9f0b62c166379ae5942e087ba1 /config | |
parent | 934f1f69022ab39b62161d26c4d1d485bd66b09f (diff) | |
parent | 22d44ae9a699c418aba442cd99eec8f58d5fa006 (diff) | |
download | gitlab-ce-1adfb156e85c270470fb10792cead9ff31b6687c.tar.gz |
Merge branch 'sh-simplify-liveness-check' into 'master'
Add /-/health basic health check endpoint
See merge request gitlab-org/gitlab-ce!20456
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 4 | ||||
-rw-r--r-- | config/routes.rb | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb index b9d4f6765e3..a086e860e16 100644 --- a/config/application.rb +++ b/config/application.rb @@ -154,6 +154,10 @@ module Gitlab config.action_view.sanitized_allowed_protocols = %w(smb) + # This middleware needs to precede ActiveRecord::QueryCache and other middlewares that + # connect to the database. + config.middleware.insert_after "Rails::Rack::Logger", "Gitlab::Middleware::BasicHealthCheck" + config.middleware.insert_after Warden::Manager, Rack::Attack # Allow access to GitLab API from other domains diff --git a/config/routes.rb b/config/routes.rb index e0a9139b1b4..aac3a77c4f1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -46,6 +46,7 @@ Rails.application.routes.draw do get 'health_check(/:checks)' => 'health_check#index', as: :health_check scope path: '-' do + # '/-/health' implemented by BasicHealthMiddleware get 'liveness' => 'health#liveness' get 'readiness' => 'health#readiness' post 'storage_check' => 'health#storage_check' |