Parse json bodies for application/*+json too
This commit is contained in:
parent
cf8039c2c7
commit
3af1f4a4e5
@ -26,7 +26,9 @@ export default class ExpressAppComponent extends ApplicationComponent<void> {
|
||||
}
|
||||
|
||||
public async init(router: Router): Promise<void> {
|
||||
router.use(express.json());
|
||||
router.use(express.json({
|
||||
type: req => req.headers['content-type']?.match(/^application\/(.+\+)?json$/)
|
||||
}));
|
||||
router.use(express.urlencoded({
|
||||
extended: true,
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user