@@ -4,6 +4,25 @@ class InfoController < RestController::BaseController
44
55 get '/v2/info' , :read
66 def read
7+ unless @config . get ( :temporary_enable_v2 )
8+ return Oj . dump ( {
9+ name : @config . get ( :info , :name ) ,
10+ build : @config . get ( :info , :build ) ,
11+ support : 'CF API v2 is disabled' ,
12+ version : @config . get ( :info , :version ) ,
13+ description : @config . get ( :info , :description ) ,
14+ authorization_endpoint : @config . get ( :login , :url ) ,
15+ token_endpoint : config . get ( :uaa , :url ) ,
16+ min_cli_version : @config . get ( :info , :min_cli_version ) ,
17+ min_recommended_cli_version : @config . get ( :info , :min_recommended_cli_version ) ,
18+ app_ssh_endpoint : @config . get ( :info , :app_ssh_endpoint ) ,
19+ app_ssh_host_key_fingerprint : @config . get ( :info , :app_ssh_host_key_fingerprint ) ,
20+ app_ssh_oauth_client : @config . get ( :info , :app_ssh_oauth_client ) ,
21+ doppler_logging_endpoint : @config . get ( :doppler , :url ) ,
22+ api_version : '' ,
23+ osbapi_version : VCAP ::CloudController ::Constants ::OSBAPI_VERSION
24+ } , mode : :compat )
25+ end
726 info = {
827 name : @config . get ( :info , :name ) ,
928 build : @config . get ( :info , :build ) ,
0 commit comments