摘要: // 第一步:安装 yarn add @nestjs/throttler 第二步:在需要使用的模块引入使用,这里是全局使用,在app.module.ts中引入这里设置的是:1分钟内只能请求10次,超过则报status为429的错误 // app.module.ts import { APP_GUAR 阅读全文
posted @ 2021-11-30 15:42 James2019 阅读(1020) 评论(0) 推荐(0) 编辑
摘要: yarn add helmet csurf import { NestFactory } from '@nestjs/core'; import { Logger, ValidationPipe } from '@nestjs/common'; import * as helmet from 'he 阅读全文
posted @ 2021-11-30 15:38 James2019 阅读(381) 评论(0) 推荐(0) 编辑