Merge branch '2.4' of github.com:MISP/MISP into chrisr3d_patch

pull/3725/head
chrisr3d 2018-09-11 15:24:23 +02:00
commit d7d1002279
1 changed files with 4 additions and 2 deletions

View File

@ -215,7 +215,6 @@ class Module extends AppModel
);
if ($moduleFamily == 'Cortex') {
if (!empty(Configure::read('Plugin.' . $moduleFamily . '_authkey'))) {
unset($request['header']['Content-Type']);
$request['header']['Authorization'] = 'Bearer ' . Configure::read('Plugin.' . $moduleFamily . '_authkey');
}
}
@ -223,7 +222,10 @@ class Module extends AppModel
if ($post) {
$response = $httpSocket->post($url . $uri, $post, $request);
} else {
$response = $httpSocket->get($url . $uri, false, $request);
if ($moduleFamily == 'Cortex') {
unset($request['header']['Content-Type']);
}
$response = $httpSocket->get($url . $uri, false, $request);
}
return json_decode($response->body, true);
} catch (Exception $e) {