mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
@@ -14,6 +14,7 @@ import jwt from './jwt';
|
||||
import mail from './mail';
|
||||
import loops from './loops';
|
||||
import bankfeed from './bankfeed';
|
||||
import throttle from './throttle';
|
||||
|
||||
export const config = [
|
||||
systemDatabase,
|
||||
@@ -32,4 +33,5 @@ export const config = [
|
||||
mail,
|
||||
loops,
|
||||
bankfeed,
|
||||
throttle,
|
||||
];
|
||||
|
||||
14
packages/server/src/common/config/throttle.ts
Normal file
14
packages/server/src/common/config/throttle.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('throttle', () => ({
|
||||
global: {
|
||||
ttl: parseInt(process.env.THROTTLE_GLOBAL_TTL ?? '60000', 10),
|
||||
limit: parseInt(process.env.THROTTLE_GLOBAL_LIMIT ?? '100', 10),
|
||||
},
|
||||
auth: {
|
||||
ttl: parseInt(process.env.THROTTLE_AUTH_TTL ?? '60000', 10),
|
||||
limit: parseInt(process.env.THROTTLE_AUTH_LIMIT ?? '10', 10),
|
||||
},
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user