Skip to content

Commit

Permalink
adjust heuristic to only consider routes
Browse files Browse the repository at this point in the history
  • Loading branch information
hmagph committed Feb 6, 2016
1 parent 5157e51 commit df6d7b0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions getItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@ function RetrieveItems()
$application = getenv("VCAP_APPLICATION");
//echo "\r\napplication:" . $application;
$application_json = json_decode($application, true);
$applicationName = $application_json["name"];
//echo "\r\napplicationName:" . $applicationName;
$catalogAppName = str_replace("ui-", "catalog-api-", $applicationName);
$catalogAppName = str_replace("-ui", "-catalog-api", $catalogAppName);
//echo "\r\ncatalogAppName:" . $catalogAppName;
$applicationURI = $application_json["application_uris"][0];
//echo "\r\napplicationURI:" . $applicationURI;
$catalogHost=substr_replace($applicationURI, $catalogAppName, 0, strlen($applicationName));
$catalogHost = str_replace("-ui-", "-catalog-api-", $applicationURI);
//echo "\r\ncatalogHost:" . $catalogHost;
$catalogRoute = "http://" . $catalogHost;
//echo "\r\ncatalogRoute:" . $catalogRoute;
Expand Down

0 comments on commit df6d7b0

Please sign in to comment.