feat: 新增限流功能 (#718)

* 请求速率限制

* perf: 优化代码

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>
This commit is contained in:
xiaozhu
2023-03-21 09:20:27 +08:00
committed by GitHub
parent 47dc009505
commit e02ab1fbad
7 changed files with 42 additions and 1 deletions

11
service/pnpm-lock.yaml generated
View File

@@ -10,6 +10,7 @@ specifiers:
eslint: ^8.35.0
esno: ^0.16.3
express: ^4.18.2
express-rate-limit: ^6.7.0
https-proxy-agent: ^5.0.1
isomorphic-fetch: ^3.0.0
node-fetch: ^3.3.0
@@ -24,6 +25,7 @@ dependencies:
dotenv: 16.0.3
esno: 0.16.3
express: 4.18.2
express-rate-limit: 6.7.0_express@4.18.2
https-proxy-agent: 5.0.1
isomorphic-fetch: 3.0.0
node-fetch: 3.3.0
@@ -1740,6 +1742,15 @@ packages:
strip-final-newline: 2.0.0
dev: true
/express-rate-limit/6.7.0_express@4.18.2:
resolution: {integrity: sha512-vhwIdRoqcYB/72TK3tRZI+0ttS8Ytrk24GfmsxDXK9o9IhHNO5bXRiXQSExPQ4GbaE5tvIS7j1SGrxsuWs+sGA==}
engines: {node: '>= 12.9.0'}
peerDependencies:
express: ^4 || ^5
dependencies:
express: 4.18.2
dev: false
/express/4.18.2:
resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==}
engines: {node: '>= 0.10.0'}