Skip to content

Commit

Permalink
Use 127.0.0.1 instead of localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
mustard-mh committed Oct 23, 2024
1 parent bf1c255 commit 327eebb
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ object ControllerStatusService {
retry(3) {
val port = BuiltInServerManager.getInstance().waitForStart().port
val httpRequest = HttpRequest.newBuilder()
.uri(URI.create("http://localhost:$port/codeWithMe/unattendedHostStatus?token=$cwmToken"))
.uri(URI.create("http://127.0.0.1:$port/codeWithMe/unattendedHostStatus?token=$cwmToken"))
.header("Content-Type", "application/json")
.GET()
.build()
6 changes: 3 additions & 3 deletions components/ide/jetbrains/launcher/main.go
Original file line number Diff line number Diff line change
@@ -432,7 +432,7 @@ func resolveGatewayLink(backendPort string, wsInfo *supervisor.WorkspaceInfoResp

func resolveJsonLink(backendPort string) (string, error) {
var (
hostStatusUrl = "http://localhost:" + backendPort + "/codeWithMe/unattendedHostStatus?token=gitpod"
hostStatusUrl = "http://127.0.0.1:" + backendPort + "/codeWithMe/unattendedHostStatus?token=gitpod"
client = http.Client{Timeout: 1 * time.Second}
)
resp, err := client.Get(hostStatusUrl)
@@ -460,7 +460,7 @@ func resolveJsonLink(backendPort string) (string, error) {

func resolveJsonLink2(launchCtx *LaunchContext, backendPort string) (*JoinLinkResponse, error) {
var (
hostStatusUrl = "http://localhost:" + backendPort + "/codeWithMe/unattendedHostStatus?token=gitpod"
hostStatusUrl = "http://127.0.0.1:" + backendPort + "/codeWithMe/unattendedHostStatus?token=gitpod"
client = http.Client{Timeout: 1 * time.Second}
)
resp, err := client.Get(hostStatusUrl)
@@ -492,7 +492,7 @@ func resolveJsonLink2(launchCtx *LaunchContext, backendPort string) (*JoinLinkRe

func terminateIDE(backendPort string) error {
var (
hostStatusUrl = "http://localhost:" + backendPort + "/codeWithMe/unattendedHostStatus?token=gitpod&exit=true"
hostStatusUrl = "http://127.0.0.1:" + backendPort + "/codeWithMe/unattendedHostStatus?token=gitpod&exit=true"
client = http.Client{Timeout: 10 * time.Second}
)
resp, err := client.Get(hostStatusUrl)

0 comments on commit 327eebb

Please sign in to comment.