cli
cli copied to clipboard
Host header not arriving correctly
Describe the bug
Host
header (which should be some-domain.loophole.site
) gets overridden with 127.0.0.1:<port>
.
To Reproduce Steps to reproduce the behavior:
- Create a server that logs the
Host
header it receives - Navigate to the loopholed domain
- Note that the host header shows up as
127.0.0.1:3000
and notmy-test.loophole.site
Expected behavior
Host header should not be changed. Alternatively (perhaps even better), there should be a way to set which host header should be used. But hardcoding to 127.0.0.1:<port>
does not make sense.
Notes
I think this was introduced with https://github.com/loophole/cli/pull/172 but I don't understand why, it breaks a lot of functionality. The idea seems to have originally come from https://github.com/loophole/cli/issues/152 but the original request asked for some --override-host
argument to specify it manually, like I also suggested above, which would have been fine, however it was hardcoded instead.