mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 02:00:51 -04:00
Merge pull request #27338 from nextcloud/backport/27329/stable19
[stable19] Propagate throttling on OCS response
This commit is contained in:
commit
a7fd0fc951
1 changed files with 5 additions and 0 deletions
|
|
@ -75,6 +75,11 @@ abstract class BaseResponse extends Response {
|
|||
$this->setLastModified($dataResponse->getLastModified());
|
||||
$this->setCookies($dataResponse->getCookies());
|
||||
|
||||
if ($dataResponse->isThrottled()) {
|
||||
$throttleMetadata = $dataResponse->getThrottleMetadata();
|
||||
$this->throttle($throttleMetadata);
|
||||
}
|
||||
|
||||
if ($format === 'json') {
|
||||
$this->addHeader(
|
||||
'Content-Type', 'application/json; charset=utf-8'
|
||||
|
|
|
|||
Loading…
Reference in a new issue