mirror of https://github.com/MISP/MISP
chg: [sync] When pushing event to remote server, request back just metadata
parent
31bb2c2ef9
commit
a5b2b4f908
|
@ -1188,14 +1188,18 @@ class Event extends AppModel
|
|||
if (is_numeric($event)) {
|
||||
return $event;
|
||||
}
|
||||
$url = $server['Server']['url'];
|
||||
$HttpSocket = $this->setupHttpSocket($server, $HttpSocket);
|
||||
$request = $this->setupSyncRequest($server);
|
||||
if ($scope === 'sightings') {
|
||||
$scope .= '/bulkSaveSightings';
|
||||
$urlPath = $event['Event']['uuid'];
|
||||
}
|
||||
$url = $server['Server']['url'];
|
||||
$uri = $url . '/' . $scope . $this->__getLastUrlPathComponent($urlPath);
|
||||
if ($scope === 'event') {
|
||||
// After creating or editing event, it is not necessary to fetch full event
|
||||
$uri .= '/metadata:1';
|
||||
}
|
||||
$data = json_encode($event);
|
||||
if (!empty(Configure::read('Security.sync_audit'))) {
|
||||
$pushLogEntry = sprintf(
|
||||
|
|
Loading…
Reference in New Issue