mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
Remove body-parser dependency (#7176)
This PR addresses issue #7158 by removing the body-parser dependency in favor of express.json() and other built-in middleware functionalities provided by Express.js.
This commit is contained in:
4
app.ts
4
app.ts
@@ -29,7 +29,6 @@ import process from 'process';
|
||||
import url from 'url';
|
||||
|
||||
import * as Sentry from '@sentry/node';
|
||||
import bodyParser from 'body-parser';
|
||||
import compression from 'compression';
|
||||
import express from 'express';
|
||||
import fs from 'fs-extra';
|
||||
@@ -525,6 +524,7 @@ async function main() {
|
||||
// Initialise express and then sentry. Sentry as early as possible to catch errors during startup.
|
||||
const webServer = express(),
|
||||
router = express.Router();
|
||||
|
||||
SetupSentry(aws.getConfig('sentryDsn'), ceProps, releaseBuildNumber, gitReleaseName, defArgs);
|
||||
|
||||
startWineInit();
|
||||
@@ -848,7 +848,7 @@ async function main() {
|
||||
),
|
||||
);
|
||||
})
|
||||
.use(bodyParser.json({limit: ceProps('bodyParserLimit', maxUploadSize)}))
|
||||
.use(express.json({limit: ceProps('bodyParserLimit', maxUploadSize)}))
|
||||
.use(siteTemplateController.createRouter())
|
||||
.use(sourceController.createRouter())
|
||||
.use(assemblyDocumentationController.createRouter())
|
||||
|
||||
Reference in New Issue
Block a user