projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refs #13667 "Merge branch '13667-add-version-file'".
[arvados.git]
/
services
/
api
/
app
/
controllers
/
arvados
/
v1
/
healthcheck_controller.rb
diff --git
a/services/api/app/controllers/arvados/v1/healthcheck_controller.rb
b/services/api/app/controllers/arvados/v1/healthcheck_controller.rb
index 47b49ff46adff90ae20b3b8831e7d2339aa73819..6d55506bb5742cf9be7c183186b60f6479ab5226 100644
(file)
--- a/
services/api/app/controllers/arvados/v1/healthcheck_controller.rb
+++ b/
services/api/app/controllers/arvados/v1/healthcheck_controller.rb
@@
-16,20
+16,20
@@
class Arvados::V1::HealthcheckController < ApplicationController
before_filter :check_auth_header
def check_auth_header
before_filter :check_auth_header
def check_auth_header
- mgmt_token = Rails.configuration.
management_t
oken
+ mgmt_token = Rails.configuration.
ManagementT
oken
auth_header = request.headers['Authorization']
if !mgmt_token
auth_header = request.headers['Authorization']
if !mgmt_token
- send_
error("disabled", status: 404)
+ send_
json ({"errors" => "disabled"}), status: 404
elsif !auth_header
elsif !auth_header
- send_
error("authorization required", status: 401)
+ send_
json ({"errors" => "authorization required"}), status: 401
elsif auth_header != 'Bearer '+mgmt_token
elsif auth_header != 'Bearer '+mgmt_token
- send_
error("authorization error", status: 403)
+ send_
json ({"errors" => "authorization error"}), status: 403
end
end
def ping
end
end
def ping
- resp = {"health"
:
"OK"}
+ resp = {"health"
=>
"OK"}
send_json resp
end
end
send_json resp
end
end