Closed handv closed 4 years ago
when i send a post request, the morgan only capture the OPTIONS method request, how can i capture the POST method request and skip the OPTIONS one? thank u very much for answer my question
I have found the reason. In my server.js, i wrote this:
app.use(router.routes());
app.use(morgan('short'))
But change the order of the two lines code, i capture the POST request, like this:
app.use(morgan('short'))
app.use(router.routes());
when i send a post request, the morgan only capture the OPTIONS method request, how can i capture the POST method request and skip the OPTIONS one? thank u very much for answer my question