Skip to content

Commit

Permalink
fix: 修复URL地址信息安全告警
Browse files Browse the repository at this point in the history
  • Loading branch information
142vip.cn committed Dec 12, 2023
1 parent 53ff12c commit 1c2e4e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/koa/koa-run-sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ app.use(async(ctx, next) => {
const middleRes1 = await next()
console.log('middleware1===>', middleRes1)
const rt = ctx.response.get('X-Response-Time')
const { method, url } = ctx
console.log(`请求信息:${method}-${url} - ${rt}`)
const { method } = ctx
// 也可以从ctx中获取url对象
console.log(`请求信息:${method} - ${rt}`)
return 'back middleware1 result'
})

Expand Down

0 comments on commit 1c2e4e2

Please sign in to comment.