mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Restore body parsing for all content-types for non webhook routes (no-changelog)(#6911)
Changes in https://github.com/n8n-io/n8n/pull/6394 removed xml body parsing for all non-webhook routes. This broken SAML endpoints as they need the XML body parser to function correctly.
This commit is contained in:
committed by
GitHub
parent
78c83168ac
commit
10c15874b2
@@ -30,7 +30,7 @@ import {
|
||||
TagsController,
|
||||
UsersController,
|
||||
} from '@/controllers';
|
||||
import { rawBody, jsonParser, setupAuthMiddlewares } from '@/middlewares';
|
||||
import { rawBodyReader, bodyParser, setupAuthMiddlewares } from '@/middlewares';
|
||||
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
@@ -118,7 +118,7 @@ export const setupTestServer = ({
|
||||
enabledFeatures,
|
||||
}: SetupProps): TestServer => {
|
||||
const app = express();
|
||||
app.use(rawBody);
|
||||
app.use(rawBodyReader);
|
||||
app.use(cookieParser());
|
||||
|
||||
const testServer: TestServer = {
|
||||
@@ -153,7 +153,7 @@ export const setupTestServer = ({
|
||||
|
||||
if (!endpointGroups) return;
|
||||
|
||||
app.use(jsonParser);
|
||||
app.use(bodyParser);
|
||||
|
||||
const [routerEndpoints, functionEndpoints] = classifyEndpointGroups(endpointGroups);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user