set to use token and url, that does not require verification to successfully return to the front end token using login
app.js
const jwtKoa = require("koa-jwt");
app.use(jwtKoa({secret}).unless({
path: [/\/adduser/, /\/login/] //jwt
}))
but without path validation, the following function does not go at all, as I have seen in other articles. I don"t know where the problem
router.js
const routers = router
.post("/product/list", user.list)
servse.js
const user = {
async list (ctx) {
console.log(ctx.headers.token, "ccccccccccc")
}
}