Skip to content

Commit

Permalink
chore: don't log rate limit (snapshot-labs#781)
Browse files Browse the repository at this point in the history
* chore: don't log rate limit

* Update rateLimit.ts

---------

Co-authored-by: Chaitanya <yourchaitu@gmail.com>
  • Loading branch information
bonustrack and ChaituVR authored Jan 8, 2024
1 parent 893a57a commit b3f0c2e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/helpers/rateLimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import rateLimit from 'express-rate-limit';
import RedisStore from 'rate-limit-redis';
import { createClient } from 'redis';
import { getIp, sendError, sha256 } from './utils';
import log from './log';

let client;

Expand Down Expand Up @@ -38,7 +37,7 @@ export default rateLimit({
return false;
},
handler: (req, res) => {
log.info(`too many requests ${hashedIp(req)}`);
// log.info(`too many requests ${hashedIp(req)}`);
sendError(
res,
'too many requests, refer to https://docs.snapshot.org/tools/api/api-keys#limits',
Expand Down

0 comments on commit b3f0c2e

Please sign in to comment.