yuken 3 lat temu
rodzic
commit
5f3153592e

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

@@ -43,7 +43,7 @@ module.exports = () => {
   return async(req: Request, res: Response, next: NextFunction) => {
   return async(req: Request, res: Response, next: NextFunction) => {
 
 
     const endpoint = req.path;
     const endpoint = req.path;
-    const key = md5(req.ip + endpoint + req.method);
+    const key = md5(`${req.ip}_${endpoint}_${req.method}`);
 
 
     let customizedConfig;
     let customizedConfig;
     const configForEndpoint = configWithoutRegExp[endpoint];
     const configForEndpoint = configWithoutRegExp[endpoint];