mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 06:00:44 +01:00
Merge pull request #2436 from mei23/mei-0824-api404
/api/ 下の存在しないにURL対しては404を返すようにする
This commit is contained in:
commit
a11c991f83
1 changed files with 5 additions and 0 deletions
|
@ -46,6 +46,11 @@ router.post('/signin', require('./private/signin').default);
|
|||
router.use(require('./service/github').routes());
|
||||
router.use(require('./service/twitter').routes());
|
||||
|
||||
// Return 404 for unknown API
|
||||
router.all('*', async ctx => {
|
||||
ctx.status = 404;
|
||||
});
|
||||
|
||||
// Register router
|
||||
app.use(router.routes());
|
||||
|
||||
|
|
Loading…
Reference in a new issue