summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/RedirectResponse.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/engine/RedirectResponse.php b/engine/RedirectResponse.php
index 7900229..4526c6c 100644
--- a/engine/RedirectResponse.php
+++ b/engine/RedirectResponse.php
@@ -2,9 +2,8 @@
class RedirectResponse extends Response {
- public function __construct(string $url) {
- parent::__construct(301);
- $this->addHeader('HTTP/1.1 301 Moved Permanently');
+ public function __construct(string $url, int $code = 302) {
+ parent::__construct($code);
$this->addHeader('Location: '.$url);
}