Calling setHeaders(getHeaders()) breaks the CSP nonce for unknown reasons
So shifting back to old standard practise for now
Signed-off-by: Joas Schilling <coding@schilljs.com>
}
if ($this->delaySlept) {
- $headers = $response->getHeaders();
- if (!isset($headers['X-Nextcloud-Bruteforce-Throttled'])) {
- $headers['X-Nextcloud-Bruteforce-Throttled'] = $this->delaySlept . 'ms';
- $response->setHeaders($headers);
- }
+ $response->addHeader('X-Nextcloud-Bruteforce-Throttled', $this->delaySlept . 'ms');
}
return parent::afterController($controller, $methodName, $response);