summaryrefslogtreecommitdiffstats
path: root/apis/debugrequest.php
blob: 8e0fd78b50f49a14280df11a13f6b76f6fef5f77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

/*$debug_settings = Property::getRemoteDebuggingConfig();
if ($debug_settings["status"] !== "enabled") {
  http_response_code(403);
  exit;
}*/
$debug_request = json_decode(file_get_contents("php://input"), true);
//$validclient = Database::queryFirst("SELECT machineuuid, clientip FROM machine WHERE machineuuid = :uuid AND clientip = :ip", array(":uuid" => $debug_request["uuid"], ":ip" => \'$_SERVER["REMOTE_ADDR"]\'));
$validclient = true;
if ($validclient == false) {
  http_response_code(400);
} else {
  http_response_code(200);
  //$data = json_encode(array("ip" => $_SERVER["REMOTE_ADDR"], "port" => 5900 + $debug_request["display"]));
  //Taskmanager::submit('relay', $data, true);
}

//echo file_get_contents("php://input");