修改当前域名判断方式 解决访问http地址时 由于站点配置是https而被错误记录的问题

This commit is contained in:
Zhai Yiming 2017-07-14 09:54:51 +08:00
parent ab59976f01
commit 68a0e34491

View File

@ -249,7 +249,7 @@ class Access_Core
$entrypoint = Typecho_Cookie::get('__typecho_access_entrypoint');
if ($entrypoint == null) {
$entrypoint = $this->request->getReferer();
if (strpos($entrypoint, rtrim(Helper::options()->siteUrl, '/')) !== false) {
if (parse_url($entrypoint, PHP_URL_HOST) == parse_url(Helper::options()->siteUrl, PHP_URL_HOST)) {
$entrypoint = null;
}
if ($entrypoint != null) {