feat: 添加短信发送限流、忽略爬虫、调整默认限流规则
This commit is contained in:
@@ -30,9 +30,10 @@ import { SmsModule } from './sms/sms.module';
|
||||
synchronize: process.env.NODE_ENV !== 'production', // Set to false in production
|
||||
}),
|
||||
ThrottlerModule.forRoot({
|
||||
ignoreUserAgents: [/googlebot/i, /bingbot/i],
|
||||
throttlers: [
|
||||
{
|
||||
limit: 1000,
|
||||
limit: 100,
|
||||
ttl: 60000, // 1 minute
|
||||
},
|
||||
],
|
||||
@@ -51,4 +52,4 @@ import { SmsModule } from './sms/sms.module';
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
})
|
||||
export class AppModule {}
|
||||
export class AppModule { }
|
||||
|
||||
Reference in New Issue
Block a user