From 0bb7b216ae6e278d60523766ee6051ba6ee4e74c Mon Sep 17 00:00:00 2001 From: Christoph Schulthess Date: Tue, 17 Jan 2017 15:24:56 +0100 Subject: added debugrequest and functions in property --- apis/debugrequest.php | 18 ++++++++++++++++++ inc/property.inc.php | 9 +++++++++ 2 files changed, 27 insertions(+) create mode 100644 apis/debugrequest.php diff --git a/apis/debugrequest.php b/apis/debugrequest.php new file mode 100644 index 00000000..d9f1a169 --- /dev/null +++ b/apis/debugrequest.php @@ -0,0 +1,18 @@ + $debug_request["uuid"], ":ip" => $_SERVER["REMOTE_ADDR"])); +if ($validclient == false) { + http_response_code(400); +} else { + http_response_code(200); + $data = json_encode(array("uuid" => $debug_request["uuid"], "ip" => $_SERVER["REMOTE_ADDR"], "port" => $debug_request["port"])); + Taskmanager::submit('relay', $data, true); +} diff --git a/inc/property.inc.php b/inc/property.inc.php index 9adfbda3..0eb700e3 100644 --- a/inc/property.inc.php +++ b/inc/property.inc.php @@ -191,4 +191,13 @@ class Property return self::get('default-ipxe'); } + public static function getRemoteDebugConfig() + { + return self::get('remote-debug-config'); + } + + public static function setRemoteDebugConfig($value) + { + return self::set('remote-debug-config', $value); + } } -- cgit v1.2.3-55-g7522