From d8e9b0a3b439a7c4e16fb4c0b14f9f96ddee732a Mon Sep 17 00:00:00 2001 From: moll0928 <112609691+moll0928@users.noreply.github.com> Date: Mon, 21 Aug 2023 09:18:06 +0000 Subject: [PATCH] Update the usage of cookie-parser --- package-lock.json | 35 ----------------------------------- package.json | 1 - src/server/app.js | 2 -- 3 files changed, 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8de354e84..66b7e7c20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,6 @@ "bcryptjs": "~2.4.3", "body-parser": "~1.20.2", "bootstrap": "~5.2.3", - "cookie-parser": "~1.4.6", "csv": "~5.3.2", "csv-parse": "~4.16.3", "csv-stringify": "~5.6.5", @@ -4338,26 +4337,6 @@ "safe-buffer": "~5.1.1" } }, - "node_modules/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-parser": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", - "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", - "dependencies": { - "cookie": "0.4.1", - "cookie-signature": "1.0.6" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/cookie-signature": { "version": "1.0.6", "license": "MIT" @@ -14881,20 +14860,6 @@ "safe-buffer": "~5.1.1" } }, - "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" - }, - "cookie-parser": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", - "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", - "requires": { - "cookie": "0.4.1", - "cookie-signature": "1.0.6" - } - }, "cookie-signature": { "version": "1.0.6" }, diff --git a/package.json b/package.json index cf46682ab..939eb829c 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,6 @@ "bcryptjs": "~2.4.3", "body-parser": "~1.20.2", "bootstrap": "~5.2.3", - "cookie-parser": "~1.4.6", "csv": "~5.3.2", "csv-parse": "~4.16.3", "csv-stringify": "~5.6.5", diff --git a/src/server/app.js b/src/server/app.js index e753cd05b..a29aac42e 100644 --- a/src/server/app.js +++ b/src/server/app.js @@ -8,7 +8,6 @@ const rateLimit = require('express-rate-limit'); const path = require('path'); const favicon = require('serve-favicon'); const logger = require('morgan'); -const cookieParser = require('cookie-parser'); const bodyParser = require('body-parser'); const config = require('./config'); @@ -62,7 +61,6 @@ if (log.level !== LogLevel.SILENT) { app.use(favicon(path.join(__dirname, '..', 'client', 'public', 'favicon.ico'))); app.use(bodyParser.json({ limit: '50mb' })); app.use(bodyParser.urlencoded({ extended: false, limit: '50mb' })); -app.use(cookieParser()); app.use('/api/users', users); app.use('/api/meters', meters);