build(deps): drop deprecated body-parser (#1745)
This commit is contained in:
committed by
GitHub
parent
616451ecc7
commit
c3e575ac77
@@ -1,5 +1,4 @@
|
||||
import { getClientIp } from '@supercharge/request-ip';
|
||||
import bodyParser from 'body-parser';
|
||||
import { TypeormStore } from 'connect-typeorm/out';
|
||||
import cookieParser from 'cookie-parser';
|
||||
import csurf from 'csurf';
|
||||
@@ -71,9 +70,9 @@ app
|
||||
server.enable('trust proxy');
|
||||
}
|
||||
server.use(cookieParser());
|
||||
server.use(bodyParser.json());
|
||||
server.use(bodyParser.urlencoded({ extended: true }));
|
||||
server.use((req, res, next) => {
|
||||
server.use(express.json());
|
||||
server.use(express.urlencoded({ extended: true }));
|
||||
server.use((req, _res, next) => {
|
||||
try {
|
||||
const descriptor = Object.getOwnPropertyDescriptor(req, 'ip');
|
||||
if (descriptor?.writable === true) {
|
||||
|
||||
Reference in New Issue
Block a user