Skip to content

Commit 39f52a3

Browse files
committed
fix: sonarqube
1 parent 4f4ed2b commit 39f52a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

backend/src/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ Redis.init()
318318
});
319319

320320
// ZAP Scan Proxy Disclosure Alert fix
321-
const blockedMethods = ['TRACE', 'TRACK', 'OPTIONS'];
321+
const blockedMethods = new Set(['TRACE', 'TRACK', 'OPTIONS']);
322322
app.use((req, res, next) => {
323-
if (blockedMethods.includes(req.method)) return res.sendStatus(HttpStatus.METHOD_NOT_ALLOWED);
323+
if (blockedMethods.has(req.method)) return res.sendStatus(HttpStatus.METHOD_NOT_ALLOWED);
324324
return next();
325325
});
326326
app.disable('x-powered-by');

0 commit comments

Comments
 (0)