Skip to content

Commit

Permalink
fix: remove ctx.request in buildAttrs
Browse files Browse the repository at this point in the history
  • Loading branch information
cybercoder-naj committed Mar 21, 2024
1 parent 3233de1 commit 932b1eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const buildAttrs = (ctx: Context, reqAttrs: AttributeMap): Attribute => {
const k = key as keyof Attribute;
switch (k) {
case 'ip':
attrs.ip = ctx.request.headers.get('x-forwarded-for') || '<ip?>';
attrs.ip = request.headers.get('x-forwarded-for') || '<ip?>';
break;

case 'method':
Expand Down

0 comments on commit 932b1eb

Please sign in to comment.