Merge pull request #33361 from overleaf/copilot/remove-direct-use-of-body-parser

Remove direct use of body-parser in favour of express built-ins

GitOrigin-RevId: 656c5f216daf68e86d53ae07d272e080bd5ab27f
This commit is contained in:
Lucie Germain
2026-09-17 11:14:46 +00:00
committed by Copybot
parent 6be5db7667
commit 210ced0d31
25 changed files with 24 additions and 65 deletions
+2 -3
View File
@@ -2,7 +2,6 @@ import Metrics from '@overleaf/metrics'
import logger from '@overleaf/logger'
import OError from '@overleaf/o-error'
import express from 'express'
import bodyParser from 'body-parser'
import * as Errors from './Errors.js'
import * as Router from './Router.js'
import { handleValidationError } from '@overleaf/validation-tools'
@@ -40,8 +39,8 @@ HistoryLogger.addSerializers({
})
export const app = express()
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: true }))
app.use(express.json())
app.use(express.urlencoded({ extended: true }))
app.use(Metrics.http.monitor(logger))
Router.initialize(app)
Metrics.injectMetricsRoute(app)
-1
View File
@@ -27,7 +27,6 @@
"@overleaf/stream-utils": "workspace:*",
"@overleaf/validation-tools": "workspace:*",
"async": "^3.2.5",
"body-parser": "1.20.4",
"bunyan": "^1.8.15",
"diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688",
"express": "4.22.1",