[Web] API: Fix content type detection (#3803)

master
Lars 2020-10-11 14:39:58 +02:00 committed by GitHub
parent a5b5652ee9
commit 44c6d0cb76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
$extra = (isset($query[3])) ? $query[3] : null; $extra = (isset($query[3])) ? $query[3] : null;
// accept json in request body // accept json in request body
if($_SERVER['HTTP_CONTENT_TYPE'] === 'application/json') { if(strpos($_SERVER['HTTP_CONTENT_TYPE'], 'application/json') !== false) {
$request = file_get_contents('php://input'); $request = file_get_contents('php://input');
$requestDecoded = json_decode($request, true); $requestDecoded = json_decode($request, true);