修复主域名判断

This commit is contained in:
net909
2026-07-02 18:02:47 +08:00
parent 7f2dfef3ba
commit 6c37f6d628
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -312,7 +312,7 @@ function getMainDomain($host)
}
}
$domain_root = file_get_contents(app()->getBasePath() . 'data' . DIRECTORY_SEPARATOR . 'domain_root.txt');
$domain_root = explode("\r\n", $domain_root);
$domain_root = explode("\n", $domain_root);
$data = explode('.', $host);
$co_ta = count($data);
if ($co_ta <= 2) return $host;
+1 -1
View File
@@ -534,7 +534,7 @@ class henet implements DnsInterface
private function saveCachedSession()
{
if ($this->cookie !== '') {
Cache::set($this->cacheKey, $this->cookie, 3600);
Cache::set($this->cacheKey, $this->cookie, 3600 * 12);
}
}