docs: add spam protection section and rateLimiter.js to README
This commit is contained in:
parent
100b2af449
commit
7176f09387
1 changed files with 5 additions and 0 deletions
|
|
@ -114,6 +114,7 @@ npx pm2 logs dienst-bot
|
||||||
src/
|
src/
|
||||||
index.js # Express webhook server
|
index.js # Express webhook server
|
||||||
messageHandler.js # Berichtverwerking en filtering
|
messageHandler.js # Berichtverwerking en filtering
|
||||||
|
rateLimiter.js # Spam protectie (max 5 per dag)
|
||||||
dienstService.js # JSON lookup en PNG bestandspaden
|
dienstService.js # JSON lookup en PNG bestandspaden
|
||||||
whatsappApi.js # WhatsApp API client (bericht + afbeelding)
|
whatsappApi.js # WhatsApp API client (bericht + afbeelding)
|
||||||
```
|
```
|
||||||
|
|
@ -124,6 +125,10 @@ src/
|
||||||
- **Fout bij verzenden PNG**: de admin krijgt een WhatsApp melding
|
- **Fout bij verzenden PNG**: de admin krijgt een WhatsApp melding
|
||||||
- **Webhook fout**: wordt gelogd in PM2 logs
|
- **Webhook fout**: wordt gelogd in PM2 logs
|
||||||
|
|
||||||
|
## Spam protectie
|
||||||
|
|
||||||
|
Elke gebruiker kan maximaal `MAX_REQUESTS_PER_DAY` (standaard 5) diensten per dag opvragen. Bij overschrijding krijgt de gebruiker een melding. De teller wordt dagelijks automatisch gereset (bij de eerste request na middernacht).
|
||||||
|
|
||||||
## Licentie
|
## Licentie
|
||||||
|
|
||||||
Privé project — niet voor distributie.
|
Privé project — niet voor distributie.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue