mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Support for cleared boot.php
This commit is contained in:
parent
95622a0f0d
commit
6a349e7fd9
15 changed files with 38 additions and 25 deletions
|
@ -15,6 +15,7 @@ use Friendica\DI;
|
|||
use Jaybizzle\CrawlerDetect\CrawlerDetect;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Network\HTTPException\ForbiddenException;
|
||||
|
||||
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
|
||||
|
@ -92,7 +93,7 @@ function blockbot_init_1(App $a) {
|
|||
|
||||
foreach ($agents as $agent) {
|
||||
if (stristr($_SERVER['HTTP_USER_AGENT'], $agent)) {
|
||||
System::httpExit(403, 'Bots are not allowed');
|
||||
throw new ForbiddenException('Bots are not allowed');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,5 +131,5 @@ function blockbot_init_1(App $a) {
|
|||
}
|
||||
|
||||
logger::info('Blocked bot', $logdata);
|
||||
System::httpExit(403, 'Bots are not allowed');
|
||||
throw new ForbiddenException('Bots are not allowed');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue