Skip to content

Commit 1b6a2d5

Browse files
Merge pull request #395 from andrechristikan/development
hotfix/rate-limit-ttl
2 parents 68d79d6 + d189d9f commit 1b6a2d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/configs/request.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { registerAs } from '@nestjs/config';
22
import bytes from 'bytes';
33
import ms from 'ms';
4+
import { seconds } from 'src/common/helper/constants/helper.function.constant';
45
import { ENUM_REQUEST_METHOD } from 'src/common/request/constants/request.enum.constant';
56

67
export default registerAs(
@@ -87,7 +88,7 @@ export default registerAs(
8788
],
8889
},
8990
throttle: {
90-
ttl: ms('500'), // 0.5 secs
91+
ttl: seconds('500'), // 0.5 secs
9192
limit: 10, // max request per reset time
9293
},
9394
})

0 commit comments

Comments
 (0)