12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- declare(strict_types=1);
- namespace OCP\AppFramework\Http;
- use OCP\AppFramework\Http;
- use OCP\Template;
- class TooManyRequestsResponse extends Response {
-
- public function __construct(int $status = Http::STATUS_TOO_MANY_REQUESTS, array $headers = []) {
- parent::__construct($status, $headers);
- $this->setContentSecurityPolicy(new ContentSecurityPolicy());
- }
-
- public function render() {
- $template = new Template('core', '429', 'blank');
- return $template->fetchPage();
- }
- }
|