1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-02 00:38:31 +09:00

Merge pull request #2436 from mei23/mei-0824-api404

/api/ 下の存在しないにURL対しては404を返すようにする
This commit is contained in:
syuilo 2018-08-24 05:40:30 +09:00 committed by GitHub
commit a11c991f83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());