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.

[Bug] Doesn’t update Host header after changing port in URL

See original GitHub issue
  • Insomnia Version: 5.14.9
  • Operating System: Ubuntu 16.04

Details

  1. Run some HTTP server on localhost port 3000.
  2. In Insomnia, create and send a new GET request to http://localhost:3000/.
  3. Run some HTTP server on localhost port 4000, such that you may inspect the raw HTTP headers received. The easiest option is nc -l 4000
  4. In Insomnia, change the request’s URL to http://localhost:4000/ and send it again.

Insomnia sends an HTTP request to localhost port 4000, but, inspecting its raw bytes, you see:

Host: localhost:3000

That is, Insomnia forgets to update the Host header.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AbdelrahmanMohamedDesokycommented, Sep 13, 2018

@supervirus5 did you also unset the proxy consideration in the Insomnia preferences?

Yeah I had to remove the proxy from Insomnia Settings Manually, Thanks !

0reactions
gschiercommented, Sep 13, 2018

@supervirus5 did you also unset the proxy consideration in the Insomnia preferences?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The port specified for the new host header site does not match ...
I'm getting the above error message trying to restore a site ... Try once after changing URL to http as your web application...
Read more >
"Invalid Host header" when running Angular/cli development ...
The --disable-host-check flag works fine if you need to run from Cloud9. I use the following command: ng serve --open --host $IP --port...
Read more >
Listeners for your Application Load Balancers
A listener is a process that checks for connection requests, using the protocol and port that you configure. The rules that you define...
Read more >
RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1
1. If the Request-URI is encoded using the "% HEX HEX" encoding [42], the origin server MUST decode the Request-URI in order to...
Read more >
How to identify and exploit HTTP Host header vulnerabilities
The ambiguity caused by supplying both an absolute URL and a Host header can also lead to discrepancies between different systems. Officially, the...
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