This commit is contained in:
make
2025-06-02 16:44:54 +08:00
parent fe1e2c04d8
commit 806429f948

View File

@@ -535,7 +535,7 @@ class SiteContext
Cache::store('redis')->handler()->expire($strKeyLimit100, 60 * 10); // 设置 10分钟 过期 Cache::store('redis')->handler()->expire($strKeyLimit100, 60 * 10); // 设置 10分钟 过期
} }
var_dump($intRequestTotalLimit10); // var_dump($intRequestTotalLimit10);
// 检查请求次数是否超过限制 // 检查请求次数是否超过限制
if ($intRequestTotalLimit10 > 30 && !$arrVisitInfo['vil_is_spider']) { if ($intRequestTotalLimit10 > 30 && !$arrVisitInfo['vil_is_spider']) {
throw new HttpException(404, 'Too Many Requests'); throw new HttpException(404, 'Too Many Requests');