mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:17:08 +00:00
Stop attempt at sending a spurious 404.
This was resulting in a bunch of "headers already sent" messages.
This commit is contained in:
@@ -365,7 +365,9 @@ app.use(function (err, req, res, next) {
|
||||
});
|
||||
|
||||
app.get("*", (req, res, next) => {
|
||||
res.status(404).send({status: 404, message: "This endpoint does not exist"});
|
||||
if (!res.headersSent) {
|
||||
res.status(404).send({status: 404, message: "This endpoint does not exist"});
|
||||
}
|
||||
});
|
||||
|
||||
app.disable('x-powered-by');
|
||||
|
||||
Reference in New Issue
Block a user