Skip to content

refactor(http): remove deprecated remote_ip_header fallback - #628

Merged
cameri merged 2 commits into
cameri:mainfrom
Ferryx349:m4
May 29, 2026
Merged

refactor(http): remove deprecated remote_ip_header fallback#628
cameri merged 2 commits into
cameri:mainfrom
Ferryx349:m4

Conversation

@Ferryx349

Copy link
Copy Markdown
Collaborator

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

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.

@changeset-bot

changeset-botBot commented May 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 803691e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
nostreamMinor

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

@coveralls

coveralls commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 65.39% (-0.01%) from 65.4% — Ferryx349:m4 into cameri:main

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'] in getRemoteAddress.
  • Updated unit tests to use network.remoteIpHeader instead 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.

FileDescription
src/utils/http.tsDrops the deprecated remote_ip_header fallback in getRemoteAddress, relying only on remoteIpHeader.
test/unit/utils/http.spec.tsUpdates/adjusts tests around getRemoteAddress configuration to align with remoteIpHeader.
.changeset/remove-deprecated-remote-ip-header.mdDocuments 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_header config was partially updated but not replaced. Consider deleting the duplicate or repurposing it to assert that providing only network.remote_ip_header no longer affects getRemoteAddress (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.

Comment threadsrc/utils/http.ts
Comment thread.changeset/remove-deprecated-remote-ip-header.md Outdated
@Ferryx349
Ferryx349force-pushed the m4 branch 2 times, most recently from 041db9d to a42c507CompareMay 26, 2026 04:18
Comment threadtest/unit/utils/http.spec.ts
Signed-off-by: ABHAY PANDEY <pandeyabhay967@gmail.com>
@Anshumancanrock

Copy link
Copy Markdown
Collaborator

Hi @Ferryx349, could you please avoid force-pushing to the PR after requesting a review?
Force pushes rewrite the commit history, which resets the review state and makes it much harder for the maintainer to follow the changes and provide proper feedback.

@Ferryx349

Copy link
Copy Markdown
CollaboratorAuthor

Hi @Ferryx349, could you please avoid force-pushing to the PR after requesting a review? Force pushes rewrite the commit history, which resets the review state and makes it much harder for the maintainer to follow the changes and provide proper feedback.

Sure, will avoid it from next times..
Thanks for guidance

@cameri
cameri merged commit ce7b838 into cameri:mainMay 29, 2026
16 of 18 checks passed
@camericameri mentioned this pull request May 29, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Ferryx349@coveralls@Anshumancanrock@cameri