BREAKING CHANGE: no longer add express.json() by default to backend

This commit is contained in:
Fredrik Adelöw
2020-09-01 11:59:31 +02:00
parent 9d5cffe5ff
commit 568f398aa9
10 changed files with 21 additions and 9 deletions
-1
View File
@@ -23,7 +23,6 @@
"@backstage/backend-common": "^0.1.1-alpha.20",
"@backstage/config": "^0.1.1-alpha.20",
"@types/express": "^4.17.6",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
+2 -3
View File
@@ -17,7 +17,6 @@
import express from 'express';
import Router from 'express-promise-router';
import cookieParser from 'cookie-parser';
import bodyParser from 'body-parser';
import Knex from 'knex';
import { Logger } from 'winston';
import { createAuthProviderRouter } from '../providers';
@@ -53,8 +52,8 @@ export async function createRouter(
});
router.use(cookieParser());
router.use(bodyParser.urlencoded({ extended: false }));
router.use(bodyParser.json());
router.use(express.urlencoded({ extended: false }));
router.use(express.json());
const providersConfig = options.config.getConfig('auth.providers');
const providers = providersConfig.keys();