Return STIX in JSON format when Accept header asks for it

pull/5488/head
Richard van den Berg 2020-01-06 17:13:49 +01:00
parent ec04686202
commit f79f90a1e4
1 changed files with 3 additions and 0 deletions

View File

@ -1188,6 +1188,9 @@ class AppController extends Controller
if ($returnFormat === 'download') {
$returnFormat = 'json';
}
if ($returnFormat === 'stix' && $this->_isJson()) {
$returnFormat = 'stix-json';
}
$elementCounter = 0;
$renderView = false;
$final = $this->$scope->restSearch($user, $returnFormat, $filters, false, false, $elementCounter, $renderView);