-
Notifications
You must be signed in to change notification settings - Fork 1k
Blocking Bots on Your AVideo Platform
Daniel Neto edited this page Apr 3, 2024
·
3 revisions
In an effort to enhance the security and performance of your AVideo platform, we provide a feature to block unwanted bots from accessing your site. This guide will walk you through how to enable bot blocking on your site by configuring the stopBotsList and stopBotsWhiteList parameters.
-
Access Configuration File:
- Navigate to your AVideo installation directory.
- Locate the
videos/configuration.phpfile. This is where you'll add your bot blocking configurations.
-
Define Bots to Block:
- Within the
configuration.phpfile, you need to specify which user agents (bots) you wish to block. - Add the
$global['stopBotsList']array with values representing parts of the user agent strings of the bots you want to block.
Example:
$global['stopBotsList'] = array('headless', 'bot', 'spider', 'rouwler', 'Nuclei', 'MegaIndex', 'NetSystemsResearch', 'CensysInspect', 'slurp', 'crawler', 'curl', 'fetch', 'loader');
- Within the
-
Define Bots to Whitelist:
- In some cases, you might want to allow certain bots (e.g., search engine crawlers) to access your site for SEO purposes.
- Use the
$global['stopBotsWhiteList']array to specify user agent strings for bots that should bypass the block.
Example:
$global['stopBotsWhiteList'] = array('facebook', 'google', 'bing', 'yahoo', 'yandex', 'twitter');
-
Save Your Changes:
- After adding the arrays to your
configuration.phpfile, save your changes.
- After adding the arrays to your
- The script checks the
User-Agentheader of incoming requests against the list of bots you've defined in the$global['stopBotsList']. - If a match is found, and the bot is not in the
$global['stopBotsWhiteList'], the request is terminated, and a message "Bot Found" along with the bot's user agent is displayed. - Bots that are listed in the
stopBotsWhiteListwill be allowed access, overriding the block list.
The Open Source Video Platform Solution
| Service | Description | Link |
|---|---|---|
| 🎯 | Professional Support - Direct assistance from core developers | Contact |
| ☁️ | AVideo CDN - High-performance video delivery network | Pricing |
AVideo Platform © 2024 - Self-hosted video streaming platform
Made with ❤️ by WWBN and the open source community