[API] Fixed only allow GET logic

master
ntimo 2019-10-03 12:56:01 +02:00
parent c67e86756f
commit 948137b4b4
No known key found for this signature in database
GPG Key ID: 3AF3627FB0440D55
1 changed files with 1 additions and 1 deletions

View File

@ -205,7 +205,7 @@ if (isset($_SESSION['mailcow_cc_role']) || isset($_SESSION['pending_mailcow_cc_u
function process_get_return($data) {
echo (!isset($data) || empty($data)) ? '{}' : json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
}
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if ($_SERVER['REQUEST_METHOD'] != 'GET') {
http_response_code(400);
echo json_encode(array(
'type' => 'error',