Fix RequestLoader autoload + trim bot list
This commit is contained in:
@@ -42,14 +42,7 @@ class RequestLogger
|
|||||||
'Sogou', 'Exabot', 'facebot',
|
'Sogou', 'Exabot', 'facebot',
|
||||||
],
|
],
|
||||||
'Scraper' => [
|
'Scraper' => [
|
||||||
'HTTrack', 'wget', 'curl', 'python-requests',
|
'HTTrack', 'Scrapy', 'PhantomJS', 'HeadlessChrome',
|
||||||
'python-httpx', 'Go-http-client', 'okhttp',
|
|
||||||
'Scrapy', 'Apache-HttpClient', 'Java/',
|
|
||||||
'ruby', 'PhantomJS', 'HeadlessChrome',
|
|
||||||
],
|
|
||||||
'Aggregator' => [
|
|
||||||
'Feedly', 'Feedbin', 'FeedReader', 'Inoreader',
|
|
||||||
'Flipboard', 'Pocket', 'Pinterest',
|
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,9 @@ if (strpos($path, '/content/') === 0) {
|
|||||||
exit;
|
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
|
// Bot detection — block known bots/AI scrapers early
|
||||||
if (RequestLogger::detectBot() !== null) {
|
if (RequestLogger::detectBot() !== null) {
|
||||||
http_response_code(403);
|
http_response_code(403);
|
||||||
|
|||||||
Reference in New Issue
Block a user