Feat: Enforce rate limit (1 post per 30s)

This commit is contained in:
2026-01-31 15:18:07 +00:00
parent d84d332c68
commit 650931fa81

View File

@@ -34,6 +34,10 @@ async function savePost(post) {
const { protect, challenge } = createExpressMiddleware({
secret: 'ai-twitter-secret-key-123',
difficulty: 'medium',
rateLimit: {
maxAttempts: 1,
windowMs: 30000 // 30 seconds
}
});
// --- API Endpoints ---