Skip to content

[fix] do not append XHeader values#1581

Open
yulodl wants to merge 1 commit intohttp-party:masterfrom
yulodl:master
Open

[fix] do not append XHeader values#1581
yulodl wants to merge 1 commit intohttp-party:masterfrom
yulodl:master

Conversation

@yulodl
Copy link
Copy Markdown

@yulodl yulodl commented Apr 20, 2022

No description provided.

pi0 added a commit to unjs/httpxy that referenced this pull request Mar 25, 2026
Preserve existing x-forwarded-* headers instead of appending proxy
values. When a request already carries these headers from a downstream
proxy, the old code would concatenate them (e.g. "10.0.0.1,192.168.1.2")
causing incorrect multi-hop attribution. Now the headers are only set
when absent, matching expected reverse-proxy behavior.

Upstream: http-party/node-http-proxy#1581
pi0 added a commit to unjs/httpxy that referenced this pull request Mar 25, 2026
…120)

Preserve existing x-forwarded-* headers instead of appending proxy
values. When a request already carries these headers from a downstream
proxy, the old code would concatenate them (e.g. "10.0.0.1,192.168.1.2")
causing incorrect multi-hop attribution. Now the headers are only set
when absent, matching expected reverse-proxy behavior.

Upstream: http-party/node-http-proxy#1581
@pi0
Copy link
Copy Markdown

pi0 commented Mar 25, 2026

This issue has been fixed in unjs/httpxy#120.

Sign up for free to 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.

2 participants