Skip to content

Commit

Permalink
IMN-873 - samlLoginCallback 400 error - fixing urlencoded body parsing (
Browse files Browse the repository at this point in the history
  • Loading branch information
ecamellini authored Oct 4, 2024
1 parent 74ff2b8 commit 805c078
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/backend-for-frontend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
initRedisRateLimiter,
rateLimiterMiddleware,
} from "pagopa-interop-commons";
import express from "express";
import { config } from "./config/config.js";
import privacyNoticeRouter from "./routers/privacyNoticeRouter.js";
import { getInteropBeClients } from "./clients/clientsProvider.js";
Expand Down Expand Up @@ -54,8 +55,13 @@ app.disable("etag");

app.use(loggerMiddleware(serviceName));

// parse files from multipart/form-data and put them in req.body
app.use(multerMiddleware);
app.use(fromFilesToBodyMiddleware);

// parse application/x-www-form-urlencoded and put it in req.body
app.use(express.urlencoded({ extended: true }));

app.use(contextMiddleware(serviceName, true));

app.use(
Expand Down

0 comments on commit 805c078

Please sign in to comment.