Fix RequestLoader autoload + trim bot list

This commit is contained in:
2026-07-28 14:53:41 +02:00
parent df8394b057
commit 28c8e895c5
2 changed files with 4 additions and 8 deletions
+1 -8
View File
@@ -42,14 +42,7 @@ class RequestLogger
'Sogou', 'Exabot', 'facebot',
],
'Scraper' => [
'HTTrack', 'wget', 'curl', 'python-requests',
'python-httpx', 'Go-http-client', 'okhttp',
'Scrapy', 'Apache-HttpClient', 'Java/',
'ruby', 'PhantomJS', 'HeadlessChrome',
],
'Aggregator' => [
'Feedly', 'Feedbin', 'FeedReader', 'Inoreader',
'Flipboard', 'Pocket', 'Pinterest',
'HTTrack', 'Scrapy', 'PhantomJS', 'HeadlessChrome',
],
];
+3
View File
@@ -89,6 +89,9 @@ if (strpos($path, '/content/') === 0) {
exit;
}
// Load RequestLogger for bot detection and request logging
require_once __DIR__ . '/../cms/core/class/RequestLogger.php';
// Bot detection — block known bots/AI scrapers early
if (RequestLogger::detectBot() !== null) {
http_response_code(403);