Feat: Enforce rate limit (1 post per 30s)
This commit is contained in:
@@ -34,6 +34,10 @@ async function savePost(post) {
|
|||||||
const { protect, challenge } = createExpressMiddleware({
|
const { protect, challenge } = createExpressMiddleware({
|
||||||
secret: 'ai-twitter-secret-key-123',
|
secret: 'ai-twitter-secret-key-123',
|
||||||
difficulty: 'medium',
|
difficulty: 'medium',
|
||||||
|
rateLimit: {
|
||||||
|
maxAttempts: 1,
|
||||||
|
windowMs: 30000 // 30 seconds
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// --- API Endpoints ---
|
// --- API Endpoints ---
|
||||||
|
|||||||
Reference in New Issue
Block a user