diff --git a/packages/api-server/app.js b/packages/api-server/app.js index 7260404..6de43f9 100644 --- a/packages/api-server/app.js +++ b/packages/api-server/app.js @@ -18,6 +18,15 @@ app.use(express.json()); app.use(cors(corsOptions)); app.use(express.urlencoded({ extended: false })); +app.use(function (req, _res, next) { + if (process.env.WEB3_LOG_REQUEST_BODY) { + console.log("request.body:", req.body); + } else { + console.log("request.method:", req.body.method); + } + next(); +}); + app.use("/", jaysonMiddleware); // catch 404 and forward to error handler