Skip to content

Commit 327eebb

Browse files
committed
Use 127.0.0.1 instead of localhost
1 parent bf1c255 commit 327eebb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/ide/jetbrains/backend-plugin/src/main/kotlin/io/gitpod/jetbrains/remote/services/ControllerStatusService.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ object ControllerStatusService {
3434
retry(3) {
3535
val port = BuiltInServerManager.getInstance().waitForStart().port
3636
val httpRequest = HttpRequest.newBuilder()
37-
.uri(URI.create("http://localhost:$port/codeWithMe/unattendedHostStatus?token=$cwmToken"))
37+
.uri(URI.create("http://127.0.0.1:$port/codeWithMe/unattendedHostStatus?token=$cwmToken"))
3838
.header("Content-Type", "application/json")
3939
.GET()
4040
.build()

components/ide/jetbrains/launcher/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ func resolveGatewayLink(backendPort string, wsInfo *supervisor.WorkspaceInfoResp
432432

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

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

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

0 commit comments

Comments
 (0)