question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Send `Host` header as the first header

See original GitHub issue

_The minor issue from https://github.com/node-fetch/node-fetch/issues/1569._

Currently it sends Host header as the last header. (If a user did not add it manually)

I think it should send Host header as the first header like it browsers and other libraries do.

Prepend it instead of appending.


“node-fetch”: “3.2.3”

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
skullkimcommented, Oct 8, 2022

I would like to work on this issue.

0reactions
nvspradeepcommented, Oct 29, 2022

@LinusU looks like someone already sent a PR for this -> https://github.com/node-fetch/node-fetch/pull/1662/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Host - HTTP - MDN Web Docs
The Host request header specifies the host and port number of the server to which the request is being sent.
Read more >
What is HTTP "Host" header? - Stack Overflow
A Host header field must be sent in all HTTP/1.1 request messages. A 400 (Bad Request) status code will be sent to any...
Read more >
Host Header - What is an HTTP Host Header injection?
The HTTP host header is a request header that specifies the domain that a client (browser) wants to access. This header is necessary...
Read more >
Host header. Change the Host header - Knowledge Base
The Host header is the mandatory header of HTTP requests. CDN servers send it to the origin when they request content. The Host...
Read more >
How to add http host header in URL? - Server Fault
You can't set HTTP headers as part of URL, it's not the way it works. At best you may be able to use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found