diff options
-rw-r--r-- | lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php b/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php index 6a943af2a1f..a0b915588ad 100644 --- a/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/BruteForceMiddleware.php @@ -130,11 +130,7 @@ class BruteForceMiddleware extends Middleware { } 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); |