mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
Fix throttle TTL to use milliseconds per NestJS v6 docs
Co-authored-by: abouolia <2197422+abouolia@users.noreply.github.com>
This commit is contained in:
@@ -2,10 +2,12 @@ import { registerAs } from '@nestjs/config';
|
|||||||
|
|
||||||
export default registerAs('throttle', () => ({
|
export default registerAs('throttle', () => ({
|
||||||
global: {
|
global: {
|
||||||
ttl: parseInt(process.env.THROTTLE_GLOBAL_TTL ?? '60', 10),
|
// TTL in milliseconds (NestJS throttler v6+)
|
||||||
|
ttl: parseInt(process.env.THROTTLE_GLOBAL_TTL ?? '60000', 10),
|
||||||
limit: parseInt(process.env.THROTTLE_GLOBAL_LIMIT ?? '100', 10),
|
limit: parseInt(process.env.THROTTLE_GLOBAL_LIMIT ?? '100', 10),
|
||||||
},
|
},
|
||||||
auth: {
|
auth: {
|
||||||
|
// TTL in milliseconds (NestJS throttler v6+)
|
||||||
ttl: parseInt(process.env.THROTTLE_AUTH_TTL ?? '60000', 10),
|
ttl: parseInt(process.env.THROTTLE_AUTH_TTL ?? '60000', 10),
|
||||||
limit: parseInt(process.env.THROTTLE_AUTH_LIMIT ?? '10', 10),
|
limit: parseInt(process.env.THROTTLE_AUTH_LIMIT ?? '10', 10),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user