Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion api.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
* This is an extremely simple proxy so that all ClusterRunner API requests can go
* thru the same host as the dashboard.
*/
$targetUrl = 'http://' . substr($_SERVER['PATH_INFO'], 1); // cut off leading "/"
$targetUrl = substr($_SERVER['PATH_INFO'], 1); // cut off leading "/"
if (0 != strpos($targetUrl, 'http')) {
$targetUrl = 'http://' . $clusterMasterUrl;
}
$origin = 'http://' . $_SERVER['HTTP_HOST'];

$ch = curl_init($targetUrl);
Expand Down