按seo需求更改站点地图
This commit is contained in:
@@ -465,6 +465,9 @@ class SiteContext
|
||||
case 'CHAPTER':
|
||||
$strFile .= "sitemap-chapters-{$intPage}.xml";
|
||||
break;
|
||||
case 'VIDEO':
|
||||
$strFile .= "sitemap-videos-{$intPage}.xml";
|
||||
break;
|
||||
default:
|
||||
throw new \think\exception\HttpException(404, 'Sitemap file not found');
|
||||
break;
|
||||
@@ -522,7 +525,7 @@ class SiteContext
|
||||
|
||||
// 检查是否在黑名单中
|
||||
if (Cache::store('redis')->handler()->sIsMember($strKeyBlacklist, $strIp)) {
|
||||
throw new HttpException(404, 'Too Many Requests');
|
||||
throw new HttpException(404, 'Too Many Requests h');
|
||||
// abort(403, 'Too Many Requests100 Your IP has been blocked.');
|
||||
}
|
||||
|
||||
@@ -537,7 +540,7 @@ class SiteContext
|
||||
|
||||
// var_dump($intRequestTotalLimit10);
|
||||
// 检查请求次数是否超过限制
|
||||
if ($intRequestTotalLimit10 > 30 && !$arrVisitInfo['vil_is_spider']) {
|
||||
if ($intRequestTotalLimit10 > 60 && !$arrVisitInfo['vil_is_spider']) {
|
||||
throw new HttpException(404, 'Too Many Requests');
|
||||
// abort(403, 'Too Many Requests');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user