浏览代码

Update Redirect page

Changed option for redirect_delay = 0
Visman 5 年之前
父节点
当前提交
ff1584ddce
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      app/Models/Pages/Redirect.php

+ 4 - 1
app/Models/Pages/Redirect.php

@@ -80,7 +80,10 @@ class Redirect extends Page
      */
      */
     protected function getHttpHeaders(): array
     protected function getHttpHeaders(): array
     {
     {
-        if (null === $this->nameTpl) {
+        if ('0' == $this->c->config->o_redirect_delay) {
+            $this->httpStatus = 302;
+            $this->nameTpl    = null;
+
             $this->header('Location', $this->link);
             $this->header('Location', $this->link);
         }
         }