diff --git a/convention.php b/convention.php index 8081dc35..4bde7d88 100644 --- a/convention.php +++ b/convention.php @@ -74,6 +74,8 @@ return [ 'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'], // pathinfo分隔符 'pathinfo_depr' => '/', + // HTTPS代理标识 + 'https_agent_name' => '', // URL伪静态后缀 'url_html_suffix' => 'html', // URL普通方式参数 用于自动生成 diff --git a/library/think/Request.php b/library/think/Request.php index f5bab0bb..7e9949a8 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1215,6 +1215,8 @@ class Request return true; } elseif (isset($server['HTTP_X_FORWARDED_PROTO']) && 'https' == $server['HTTP_X_FORWARDED_PROTO']) { return true; + } elseif (Config::get('https_agent_name') && isset($server[Config::get('https_agent_name')])) { + return true; } return false; }