feat: 添加密码登陆接口限流
This commit is contained in:
@@ -44,6 +44,10 @@ export class AuthController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Post('login/password')
|
@Post('login/password')
|
||||||
|
@UseGuards(ThrottlerGuard)
|
||||||
|
@Throttle({ 'min': { limit: 10, ttl: 60 * 1000 } })
|
||||||
|
@Throttle({ 'hour': { limit: 20, ttl: 60 * 60 * 1000 } })
|
||||||
|
@Throttle({ 'day': { limit: 50, ttl: 24 * 60 * 60 * 1000 } })
|
||||||
async loginByPassword(
|
async loginByPassword(
|
||||||
@Body() loginDto: LoginByPasswordDto,
|
@Body() loginDto: LoginByPasswordDto,
|
||||||
@Res({ passthrough: true }) res: Response,
|
@Res({ passthrough: true }) res: Response,
|
||||||
|
|||||||
Reference in New Issue
Block a user