diff --git a/services/nginx/app/classes/authentication.php b/services/nginx/app/classes/authentication.php index 69699b26..00376a5f 100644 --- a/services/nginx/app/classes/authentication.php +++ b/services/nginx/app/classes/authentication.php @@ -97,10 +97,10 @@ class authentication implements authentication_i { // Get the token from the headers $headers = getallheaders(); - if (!isset($headers['Authorization']) && !isset($_GET['token'])) { + if (!isset($headers['Authorization']) && !isset($_GET['token']) && !isset($_POST['token'])) { return false; } - $token = $_GET['token'] ?? $headers['Authorization']; + $token = $_GET['token'] ?? $headers['Authorization'] ?? $_POST['token']; // Strip the Bearer prefix (If the token is from the headers) if (isset($headers['Authorization'])) { $token = str_replace('Bearer ', '', $token);