Browse Source

add endpoint

yuken 3 years ago
parent
commit
8942153ff0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/app/src/server/middlewares/api-rate-limiter.ts

+ 1 - 1
packages/app/src/server/middlewares/api-rate-limiter.ts

@@ -35,7 +35,7 @@ module.exports = () => {
   return async(req: Request, res: Response, next: NextFunction) => {
 
     const endpoint = req.path;
-    const key = req.ip + req.url;
+    const key = req.ip + endpoint;
 
     let points = defaultConsumePoints;
     Object.keys(apiRateLimitConfig).forEach((endpointInConfig) => {