https://github.com/ronaldaug/api-protector
API Protector (Cockpit CMS addon) - Rate Limit and Protect Content Scraping
https://github.com/ronaldaug/api-protector
Last synced: about 1 month ago
JSON representation
API Protector (Cockpit CMS addon) - Rate Limit and Protect Content Scraping
- Host: GitHub
- URL: https://github.com/ronaldaug/api-protector
- Owner: ronaldaug
- Created: 2022-07-14T04:55:02.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-14T05:35:01.000Z (almost 3 years ago)
- Last Synced: 2025-02-10T03:12:45.048Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Protector addon for Cockpit CMS
Rate Limit and Protect Content Scraping
[Download this repo](https://github.com/ronaldaug/api-protector/archive/refs/heads/main.zip), extract zip and put into `addons` folder of Cockpit CMS.
Play with the configs in [config.php](https://github.com/ronaldaug/api-protector/blob/main/config.php)
## Configs
- **limit** - number of connections to limit user to per minutes. Default value is `100` and it means it allows 100 calls per minute.
- **minutes** - number of minutes to check for.
- **seconds** - retry after minutes in seconds.
- **show_only** - protect scraping collection data, `0` will show all entries.
By default, routing to `api/collections/entries/[mycollection]` will show all the entries, this is a kind of exposing the whole collection data. By setting `show_only` to `10`, it will show only `10` results per call.----
> Note : This is not an official Cockpit addon
----
Credit to
- [https://gist.github.com/freekrai](freekrai)
- [Session Based Rate Limitor Gist](https://gist.github.com/freekrai/cdcd6ebb29d84b9dc244282e64caf5fe)