mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 20:00:02 +00:00
🔀 Merge branch 'xml-body-parser-webhooks' of https://github.com/quansenB/n8n into quansenB-xml-body-parser-webhooks
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
getConnectionManager,
|
||||
} from 'typeorm';
|
||||
import * as bodyParser from 'body-parser';
|
||||
require('body-parser-xml')(bodyParser);
|
||||
import * as history from 'connect-history-api-fallback';
|
||||
import * as requestPromise from 'request-promise-native';
|
||||
|
||||
@@ -235,6 +236,14 @@ class App {
|
||||
req.rawBody = buf;
|
||||
}}));
|
||||
|
||||
// Support application/xml type post data
|
||||
// @ts-ignore
|
||||
this.app.use(bodyParser.xml({ limit: "16mb", xmlParseOptions: {
|
||||
normalize: true, // Trim whitespace inside text nodes
|
||||
normalizeTags: true, // Transform tags to lowercase
|
||||
explicitArray: false // Only put properties in array if length > 1
|
||||
} }));
|
||||
|
||||
// Make sure that Vue history mode works properly
|
||||
this.app.use(history({
|
||||
rewrites: [
|
||||
|
||||
Reference in New Issue
Block a user