Skip to content

Commit

Permalink
Add some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-macpherson committed Sep 12, 2024
1 parent 4a9654e commit 97e973c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/web/resolvers/utils/getPostingIpAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const isNextRequest = (req: NextRequest | Request): req is NextRequest => {
}

export const getPostingIpAddress = (req: NextRequest | Request) => {
console.log('headers', req?.headers)
console.log('ip', (req as any)?.ip)

if (isNextRequest(req)) return req.ip

const headers = req?.headers['X-Forwarded-For']
Expand Down

0 comments on commit 97e973c

Please sign in to comment.