From 77498e16414576b4e2c029dd344ca196784cd75f Mon Sep 17 00:00:00 2001 From: ymw0407 Date: Fri, 6 Oct 2023 19:57:02 +0900 Subject: [PATCH 1/2] Fix : resolve expressjs security hotspot problems #130 --- src/file/env-template/Expressjs/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/file/env-template/Expressjs/index.js b/src/file/env-template/Expressjs/index.js index ae8a293..3fd0e9e 100644 --- a/src/file/env-template/Expressjs/index.js +++ b/src/file/env-template/Expressjs/index.js @@ -1,6 +1,7 @@ import express from 'express'; const app = express(); +app.disable('x-powered-by') const PORT = 8080; app.get('/', (req, res) => { From 8baf88067875a3462dd83669437b737f869f5e1b Mon Sep 17 00:00:00 2001 From: ymw0407 Date: Fri, 6 Oct 2023 20:01:00 +0900 Subject: [PATCH 2/2] Fix : reordering code simply --- src/file/env-template/Expressjs/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/file/env-template/Expressjs/index.js b/src/file/env-template/Expressjs/index.js index 3fd0e9e..d339eae 100644 --- a/src/file/env-template/Expressjs/index.js +++ b/src/file/env-template/Expressjs/index.js @@ -1,9 +1,10 @@ import express from 'express'; const app = express(); -app.disable('x-powered-by') const PORT = 8080; +app.disable('x-powered-by') + app.get('/', (req, res) => { res.send('Hello World!'); });