瀏覽代碼

Fix use $_SERVER[ 'HTTPS']

https://www.php.net/manual/reserved.variables.server.php
Visman 5 年之前
父節點
當前提交
308704023b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/bootstrap.php

+ 1 - 1
app/bootstrap.php

@@ -31,7 +31,7 @@ require __DIR__ . '/functions.php';
 \ForkBB\_init($c);
 
 // https or http?
-if (isset($_SERVER['HTTPS']) && \strtolower($_SERVER['HTTPS']) !== 'off') {
+if (!empty($_SERVER['HTTPS']) && \strtolower($_SERVER['HTTPS']) !== 'off') {
     $c->BASE_URL = \str_replace('http://', 'https://', $c->BASE_URL);
 } else {
     $c->BASE_URL = \str_replace('https://', 'http://', $c->BASE_URL);