Skip to content

Commit 469def3

Browse files
committed
try capturing inside the no match
1 parent 7214d1c commit 469def3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/middlewares/base-handler.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ export function createBaseHandler() {
4848
})
4949
},
5050
onNoMatch: (req, res) => {
51+
if (req.method === 'OPTIONS') {
52+
logger.info('OPTIONS request')
53+
res.send(200).end()
54+
}
55+
5156
res.status(404).json({
5257
statusCode: 404,
5358
error: 'Not Found',

0 commit comments

Comments
 (0)