Skip to content

fix: ensure Host header is sent first in HTTP requests - #1909

Open
lynvortex wants to merge 1 commit into
node-fetch:mainfrom
lynvortex:fix-host-header-first
Open

fix: ensure Host header is sent first in HTTP requests#1909
lynvortex wants to merge 1 commit into
node-fetch:mainfrom
lynvortex:fix-host-header-first

Conversation

@lynvortex

Copy link
Copy Markdown

Fix #1570

Move Host header to the first position in the headers object to match browser behavior where Host is always the first header sent in HTTP requests.

Currently, the Host header is placed in alphabetical order among other headers. This change ensures it is always the first header.

Fix node-fetch#1570

Move Host header to the first position in the headers object
to match browser behavior where Host is always the first header.
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.

Send Host header as the first header

1 participant