mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2026-07-15 03:51:31 +08:00
修复主域名判断
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user