The / post/:id interface is accessed twice in a row, and the id value passed in the second time is performance-now.js.map.

use an article details interface written in the koa framework, router is: / post/:id. When the
address bar enters localhost:3000/post/5c3edc8815ec073b1c221563, the article details API is called twice in a row. The id obtained by
for the first time is 5c3edc8815ec073b1c221563, which is correct; the id obtained for the second time is performance-now.js.map, which is magical.

nodemon,koa-views,koa-static,koa-session,koa-bodyparser is used in this project.

later, I changed router to / post/:id/detail to avoid the above problems.

but I still don"t understand why the article details API is automatically called twice when / post/:id?

May.31,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e57de5-45483.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e57de5-45483.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?