refactor(http): remove deprecated remote_ip_header fallback - #628
Conversation
🦋 Changeset detectedLatest commit: 803691e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR removes support for the deprecated network.remote_ip_header configuration key in the HTTP utilities, standardizing remote address extraction on network.remoteIpHeader.
Changes:
- Removed the runtime fallback (and warning) that read
settings.network['remote_ip_header']ingetRemoteAddress. - Updated unit tests to use
network.remoteIpHeaderinstead of the deprecated snake_case key. - Added a changeset entry documenting the refactor.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/utils/http.ts | Drops the deprecated remote_ip_header fallback in getRemoteAddress, relying only on remoteIpHeader. |
test/unit/utils/http.spec.ts | Updates/adjusts tests around getRemoteAddress configuration to align with remoteIpHeader. |
.changeset/remove-deprecated-remote-ip-header.md | Documents the removal of deprecated config support for release notes. |
Comments suppressed due to low confidence (1)
test/unit/utils/http.spec.ts:40
- There are now two identical test cases (same settings shape and same expectation). This looks like the old test for the deprecated
network.remote_ip_headerconfig was partially updated but not replaced. Consider deleting the duplicate or repurposing it to assert that providing onlynetwork.remote_ip_headerno longer affectsgetRemoteAddress(i.e., it should fall back to the socket address).
it('returns address using network.remoteIpHeader when set', () => {
expect(
getRemoteAddress(
request,
{ network: { remoteIpHeader: header, trustedProxies: [socketAddress] } } as any,
)
).to.equal(address)
})
it('returns address using network.remoteIpHeader when set (duplicate shape)', () => {
expect(
getRemoteAddress(
request,
{ network: { remoteIpHeader: header, trustedProxies: [socketAddress] } } as any,
)
).to.equal(address)
})
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
041db9d to
a42c507CompareUh oh!
There was an error while loading. Please reload this page.
Signed-off-by: ABHAY PANDEY <pandeyabhay967@gmail.com>
Anshumancanrock
commented
May 29, 2026
Hi @Ferryx349, could you please avoid force-pushing to the PR after requesting a review? |
Ferryx349
commented
May 29, 2026
Sure, will avoid it from next times.. |
Description
This PR removes deprecated network.remote_ip_header support.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: