mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
add xml body parser for xml webhook support
This commit is contained in:
parent
366fe861ca
commit
a53d111e56
|
@ -76,6 +76,7 @@
|
||||||
"@oclif/errors": "^1.2.2",
|
"@oclif/errors": "^1.2.2",
|
||||||
"basic-auth": "^2.0.1",
|
"basic-auth": "^2.0.1",
|
||||||
"body-parser": "^1.18.3",
|
"body-parser": "^1.18.3",
|
||||||
|
"body-parser-xml": "^1.1.0",
|
||||||
"compression": "^1.7.4",
|
"compression": "^1.7.4",
|
||||||
"connect-history-api-fallback": "^1.6.0",
|
"connect-history-api-fallback": "^1.6.0",
|
||||||
"convict": "^5.0.0",
|
"convict": "^5.0.0",
|
||||||
|
|
|
@ -7,6 +7,7 @@ import {
|
||||||
getConnectionManager,
|
getConnectionManager,
|
||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
import * as bodyParser from 'body-parser';
|
import * as bodyParser from 'body-parser';
|
||||||
|
require('body-parser-xml')(bodyParser);
|
||||||
import * as history from 'connect-history-api-fallback';
|
import * as history from 'connect-history-api-fallback';
|
||||||
import * as requestPromise from 'request-promise-native';
|
import * as requestPromise from 'request-promise-native';
|
||||||
|
|
||||||
|
@ -232,6 +233,10 @@ class App {
|
||||||
// Support application/json type post data
|
// Support application/json type post data
|
||||||
this.app.use(bodyParser.json({ limit: "16mb" }));
|
this.app.use(bodyParser.json({ limit: "16mb" }));
|
||||||
|
|
||||||
|
// Support application/xml type post data
|
||||||
|
// @ts-ignore
|
||||||
|
this.app.use(bodyParser.xml({ limit: "16mb" }));
|
||||||
|
|
||||||
// Make sure that Vue history mode works properly
|
// Make sure that Vue history mode works properly
|
||||||
this.app.use(history({
|
this.app.use(history({
|
||||||
rewrites: [
|
rewrites: [
|
||||||
|
|
Loading…
Reference in a new issue