mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-26 15:09:15 -06:00
Fix
This commit is contained in:
@@ -46,6 +46,11 @@ router.post('/contactUs', auth, express.json(), async (req, res, next)=>{
|
||||
else if(req.body.message.length > 100000)
|
||||
return res.status(400).send({message: 'message is too long'})
|
||||
|
||||
const svc_edgeRateLimit = req.services.get('edge-rate-limit');
|
||||
if ( ! svc_edgeRateLimit.check('contact-us') ) {
|
||||
return res.status(429).send('Too many requests.');
|
||||
}
|
||||
|
||||
// modules
|
||||
const db = req.services.get('database').get(DB_WRITE, 'feedback');
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class EdgeRateLimitService extends BaseService {
|
||||
limit: 10,
|
||||
window: 15 * MINUTE,
|
||||
},
|
||||
['contactUs']: {
|
||||
['contact-us']: {
|
||||
limit: 10,
|
||||
window: 15 * MINUTE,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user