Skip to content

Commit

Permalink
Removing body parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ourwarmhouse committed Nov 11, 2021
1 parent 50e8bfa commit 908de2c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 61 deletions.
5 changes: 2 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const path = require('path');
const express = require('express');
const logger = require('morgan');
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');
const session = require('express-session');
const moment = require('moment');
const _ = require('lodash');
Expand Down Expand Up @@ -362,7 +361,7 @@ app.enable('trust proxy');
app.use(helmet());
app.set('port', process.env.PORT || 1111);
app.use(logger('dev'));
app.use(bodyParser.urlencoded({ extended: false }));
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser(config.secretCookie));
app.use(session({
resave: true,
Expand All @@ -376,7 +375,7 @@ app.use(session({
store: store
}));

app.use(bodyParser.json({
app.use(express.json({
// Only on Stripe URL's which need the rawBody
verify: (req, res, buf) => {
if(req.originalUrl === '/stripe/subscription_update'){
Expand Down
58 changes: 1 addition & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"axios": "^0.21.1",
"badwords-list": "^1.0.0",
"bcryptjs": "^2.4.3",
"body-parser": "^1.19.0",
"cheerio": "^0.22.0",
"colors": "^1.4.0",
"connect-mongodb-session": "^2.2.0",
Expand Down

0 comments on commit 908de2c

Please sign in to comment.