Handlers #1475
Answered
by
an-tao
TheHellTower
asked this question in
Q&A
Handlers
#1475
-
Hello, as everyone know you can register handlers for specific endpoints and query, but I can't manage to find a way to "redirect all the not registered handlers" to a custom 404, example in NodeJS for Express app.use(function(req, res, next) {
res.status(404).send("404");
next();
}); Is there anything similar in drogon that I missed ? Regards. |
Beta Was this translation helpful? Give feedback.
Answered by
an-tao
Jan 6, 2023
Replies: 1 comment 1 reply
-
You could use the app().setCustom404Page method to create a custom 404 page, or use the app().setDefaultHandler method for more flexible actions. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
an-tao
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could use the app().setCustom404Page method to create a custom 404 page, or use the app().setDefaultHandler method for more flexible actions.