Skip to content

Commit f90c184

Browse files
Added one constant to the target host
1 parent 55a719f commit f90c184

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

docs/cli/thv_proxy.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/cli/thv_run.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/transport/http.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ const (
1919
// LocalhostName is the standard hostname for localhost
2020
LocalhostName = "localhost"
2121
// LocalhostIPv4 is the standard IPv4 address for localhost
22-
// We use 0.0.0.0 instead of 127.0.0.1 because 127.0.0.1 is not accessible from the host
23-
LocalhostIPv4 = "0.0.0.0"
22+
LocalhostIPv4 = "127.0.0.1"
23+
// TargetHostIPv4 is the standard IPv4 address for the target host
24+
TargetHostIPv4 = "0.0.0.0"
2425
)
2526

2627
// HTTPTransport implements the Transport interface using Server-Sent/Streamable Events.
@@ -69,7 +70,7 @@ func NewHTTPTransport(
6970

7071
// If targetHost is not specified, default to localhost
7172
if targetHost == "" {
72-
targetHost = LocalhostIPv4
73+
targetHost = TargetHostIPv4
7374
}
7475

7576
return &HTTPTransport{

0 commit comments

Comments
 (0)