From 3af0a84b9a714cf27840298a56ef51225143ee3a Mon Sep 17 00:00:00 2001 From: Bruno Vieira Date: Thu, 11 Aug 2022 22:45:58 +0100 Subject: [PATCH] Update index.php Fixed case sensitive header variables --- ost_wbs/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ost_wbs/index.php b/ost_wbs/index.php index 6ef27e8..ff2c623 100644 --- a/ost_wbs/index.php +++ b/ost_wbs/index.php @@ -25,8 +25,11 @@ class OSTicketAPI { public static function open($request) { + // Header - $key = array("apikey" => getallheaders()["Apikey"]); + $headers = array_change_key_case(getallheaders(), CASE_LOWER); + $key = array("apikey" => $headers["apikey"]); + // Body $requestBody = json_decode(file_get_contents('php://input'), true);