mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-12 13:48:28 +09:00
Return 404 for unknown API
This commit is contained in:
parent
efae7a7bce
commit
839be6477d
@ -46,6 +46,11 @@ router.post('/signin', require('./private/signin').default);
|
|||||||
router.use(require('./service/github').routes());
|
router.use(require('./service/github').routes());
|
||||||
router.use(require('./service/twitter').routes());
|
router.use(require('./service/twitter').routes());
|
||||||
|
|
||||||
|
// Return 404 for unknown API
|
||||||
|
router.all('*', async ctx => {
|
||||||
|
ctx.status = 404;
|
||||||
|
});
|
||||||
|
|
||||||
// Register router
|
// Register router
|
||||||
app.use(router.routes());
|
app.use(router.routes());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user