chore: update rate limits

This commit is contained in:
Yanlong Wang 2024-05-14 19:44:35 +08:00
parent 2e3c217479
commit ec4ce4fef3
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37
2 changed files with 8 additions and 8 deletions

View File

@ -375,8 +375,8 @@ ${this.content}
const apiRoll = await this.rateLimitControl.simpleRPCUidBasedLimit(rpcReflect, uid, ['CRAWL'],
[
// 1000 requests per minute
new Date(Date.now() - 60 * 1000), 1000
// 200 requests per minute
new Date(Date.now() - 60 * 1000), 200
]
);
@ -393,8 +393,8 @@ ${this.content}
} else if (ctx.req.ip) {
const apiRoll = await this.rateLimitControl.simpleRpcIPBasedLimit(rpcReflect, ctx.req.ip, ['CRAWL'],
[
// 100 requests per minute
new Date(Date.now() - 60 * 1000), 100
// 20 requests per minute
new Date(Date.now() - 60 * 1000), 20
]
);

View File

@ -153,8 +153,8 @@ export class SearcherHost extends RPCHost {
await this.rateLimitControl.simpleRPCUidBasedLimit(rpcReflect, uid, ['CRAWL'],
[
// 1000 requests per minute
new Date(Date.now() - 60 * 1000), 1000
// 40 requests per minute
new Date(Date.now() - 60 * 1000), 40
]
);
@ -169,8 +169,8 @@ export class SearcherHost extends RPCHost {
this.threadLocal.set('ip', ctx.req.ip);
await this.rateLimitControl.simpleRpcIPBasedLimit(rpcReflect, ctx.req.ip, ['CRAWL'],
[
// 100 requests per minute
new Date(Date.now() - 60 * 1000), 100
// 5 requests per minute
new Date(Date.now() - 60 * 1000), 5
]
);
}