Closed
Description
At the very beginning of its open source life, ParseServer was not calling next()
to hand off execution to later middlewares — then (if my notes are correct), a change with version 2.2.16 ParseServer began calling next()
after execution. We implemented a middleware directly after as a stopgap measure until we could properly deal with the fallthrough. But now it appears our middleware is not being called on requests that are Parse queries. Here's our setup:
var api = new ParseServer({/*...*/});
var mountPath = process.env.PARSE_MOUNT || "/parse";
app.use(mountPath, api);
app.use(function (req, res, next) {
// !! NEVER EXECUTES WHEN PATH IS /parse/classes/<className> OR /parse/functions/<functionName>
var path = req.path.split('/');
var req_id = req.headers['x-request-id'];
console.log(req_id + " checking parse-next() middleware through " + req.path );
// ...
});
Currently using ParseServer 2.4.2. We're hoping to set up some server-wide instrumentation, which would require executing middlewares after parse-server even on routes it handled.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels