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

This commit is contained in:
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

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;
// 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');
$requestDecoded = json_decode($request, true);