Project-Image-Uploader/backend
matthias.lotz 0dce5fddac feat(phase2): Implement Rate-Limiting & Brute-Force Protection (Task 9)
Rate-Limiting:
- IP-based: 10 requests per hour per IP
- Applies to all /api/manage/* routes
- Returns 429 Too Many Requests when limit exceeded
- Automatic cleanup of expired records (>1h old)

Brute-Force Protection:
- Tracks failed token validation attempts
- After 20 failed attempts: IP banned for 24 hours
- Returns 403 Forbidden for banned IPs
- Integrated into GET /api/manage/:token route

Technical Implementation:
- Created backend/src/middlewares/rateLimiter.js
- In-memory storage with Map() for rate limit tracking
- Separate Map() for brute-force detection
- Middleware applied to all management routes
- Token validation failures increment brute-force counter

Tested:
 Rate limit blocks after 10 requests
 429 status code returned correctly
 Middleware integration working
 IP-based tracking functional
2025-11-11 19:59:41 +01:00
..
src feat(phase2): Implement Rate-Limiting & Brute-Force Protection (Task 9) 2025-11-11 19:59:41 +01:00
.dockerignore feat: Complete image description feature implementation 2025-11-07 23:20:50 +01:00
.env.example 🚀 Refactor: Saubere Docker-Struktur mit getrennten dev/prod Umgebungen 2025-11-05 23:00:25 +01:00
.gitignore Initial Commit 2025-10-15 21:33:00 +02:00
package.json feat(phase2): Implement Management Portal API (Tasks 2-7) 2025-11-10 20:00:54 +01:00