Removed server side pretty printing.

This commit is contained in:
flash 2024-09-05 20:44:08 +00:00
parent 0848b6e708
commit 76dcedcff6

View file

@ -14,7 +14,6 @@ class AleisterContentHandler implements IContentHandler {
public function hasAcceptableType(): bool {
return $this->accept->getMostPreferred([
'application/json',
'text/html', // pretty printed JSON
]) !== null;
}
@ -49,10 +48,6 @@ class AleisterContentHandler implements IContentHandler {
| JSON_PRESERVE_ZERO_FRACTION
| JSON_INVALID_UTF8_SUBSTITUTE;
// pretty print if text/html is acceptable, someone is likely poking using a browser
if($this->accept->isAcceptable('text/html'))
$flags |= JSON_PRETTY_PRINT;
$response->setContent(json_encode($content, $flags));
}
}