summaryrefslogtreecommitdiff
path: root/pages/api/computer.php
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-03-12 19:16:53 +0100
committerRaindropsSys <contact@minteck.org>2023-03-12 19:16:53 +0100
commiteb89b15c0f044673c1206a418a21d0baba1a675e (patch)
tree39ac31a576d8b8392cbd9baf8d67621bf2cefa86 /pages/api/computer.php
parent5385f0ed8fbb4325203a222a75e6700ffb519349 (diff)
downloadpluralconnect-eb89b15c0f044673c1206a418a21d0baba1a675e.tar.gz
pluralconnect-eb89b15c0f044673c1206a418a21d0baba1a675e.tar.bz2
pluralconnect-eb89b15c0f044673c1206a418a21d0baba1a675e.zip
Updated 104 files, added 3 files, deleted 4 files and renamed 36 files (automated)
Diffstat (limited to 'pages/api/computer.php')
-rw-r--r--pages/api/computer.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/pages/api/computer.php b/pages/api/computer.php
index d3ec15a..8261fa8 100644
--- a/pages/api/computer.php
+++ b/pages/api/computer.php
@@ -1,12 +1,16 @@
<?php
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.inc"; global $isLoggedIn; global $_PROFILE;
+if (isset($_GET["chrome"])) {
+ header("Access-Control-Allow-Origin: chrome-extension://klenhenmabddpffgdaijdkjmfkkafbno");
+}
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $_PROFILE;
if (!$isLoggedIn) header("Location: /-/login") and die();
$request_raw = file_get_contents('php://input');
$json_object = json_decode($request_raw, true);
-$host = md5($json_object['host']);
+$host = md5($json_object['host'] ?? $_GET["host"]);
switch ($_GET['type']) {
case "heartbeat":