request.ip via x-forwarded-for should strip out ports
Open
Nobody has claimed this yet.
help wanted
- Dominant language
- JavaScript
- Stars
- 35.7k
- Forks
- 3.2k
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 2
Description
on azure (yes, i know), ports are also being sent as well as the ip in `x-forwarded-for`:
```
'x-forwarded-for': '23.243.1.1:38242'
```
`request.ip` should not return the port section. aye or nay?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the request.ip entry point and trace how the x-forwarded-for header is parsed. Reproduce the Azure-style value shown in the issue, then verify that request.ip excludes the port while preserving the client IP; no specific file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100