summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDJ Mountney <david@twkie.net>2016-05-09 16:21:22 -0700
committerDJ Mountney <david@twkie.net>2016-05-10 08:46:02 -0700
commit160ef66d1bbbbc593516c7575d6b02ddb019c000 (patch)
tree95d2b3e09d56a2237da09c48281201d5ab8d73bf /config
parent9898f9b4e6b80edaa914675edfa9b229498b31fe (diff)
downloadgitlab-ce-160ef66d1bbbbc593516c7575d6b02ddb019c000.tar.gz
Add health_check access token, and enforce on the health_check endpoint
Also added a health check page to the admin section for resetting the token.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index cac800b9a9c..c81bf294a53 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -74,7 +74,7 @@ Rails.application.routes.draw do
end
# Health check
- health_check_routes
+ get 'health_check(/:checks)(.:format)' => 'health_check#index'
# Enable Grack support
mount Grack::AuthSpawner, at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post, :put]
@@ -256,6 +256,7 @@ Rails.application.routes.draw do
end
resource :logs, only: [:show]
+ resource :health_check, controller: 'health_check', only: [:show]
resource :background_jobs, controller: 'background_jobs', only: [:show]
resources :namespaces, path: '/projects', constraints: { id: /[a-zA-Z.0-9_\-]+/ }, only: [] do
@@ -287,6 +288,7 @@ Rails.application.routes.draw do
resource :application_settings, only: [:show, :update] do
resources :services
put :reset_runners_token
+ put :reset_health_check_token
put :clear_repository_check_states
end