From c2e70e05178c9569e9de2ac5b3ef47440c49efc5 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 21 May 2014 16:35:50 -0400 Subject: [PATCH] Changed API server to use X-External-Client instead of X-Keep-Proxy-Required. refs #2776 --- .../api/app/controllers/arvados/v1/keep_services_controller.rb | 2 +- services/api/test/integration/keep_proxy_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/api/app/controllers/arvados/v1/keep_services_controller.rb b/services/api/app/controllers/arvados/v1/keep_services_controller.rb index 2cb68fdd70..fc2ee93002 100644 --- a/services/api/app/controllers/arvados/v1/keep_services_controller.rb +++ b/services/api/app/controllers/arvados/v1/keep_services_controller.rb @@ -10,7 +10,7 @@ class Arvados::V1::KeepServicesController < ApplicationController end def accessible - if request.headers['X-Keep-Proxy-Required'] + if request.headers['X-External-Client'] == '1' @objects = model_class.where('service_type=?', 'proxy') else @objects = model_class.where('service_type=?', 'disk') diff --git a/services/api/test/integration/keep_proxy_test.rb b/services/api/test/integration/keep_proxy_test.rb index 347f69d576..d4155c2c4a 100644 --- a/services/api/test/integration/keep_proxy_test.rb +++ b/services/api/test/integration/keep_proxy_test.rb @@ -10,7 +10,7 @@ class KeepProxyTest < ActionDispatch::IntegrationTest assert_equal 'disk', services[0]['service_type'] assert_equal 'disk', services[1]['service_type'] - get "/arvados/v1/keep_services/accessible", {:format => :json}, auth(:active).merge({'HTTP_X_KEEP_PROXY_REQUIRED' => true}) + get "/arvados/v1/keep_services/accessible", {:format => :json}, auth(:active).merge({'HTTP_X_EXTERNAL_CLIENT' => '1'}) assert_response :success services = json_response['items'] -- 2.30.2