From 1dea98d4d001feb843112d089b810aa08429a4c9 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 5 Apr 2024 16:03:08 +0300 Subject: [PATCH] fix(vscode-web): use `--host 127.0.01` MS code-server defaults to using `--host localhost`, which was working perfectly fine with Coder. But recently Coder is failing to proxy vscode-web with the https://github.com/coder/coder/issues/12790 As a workaround setting `--host 127.0.0.1` works. --- vscode-web/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index 250c6514..491906f8 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -51,6 +51,6 @@ if [ ! -f ~/.vscode-server/data/Machine/settings.json ]; then echo "${SETTINGS}" > ~/.vscode-server/data/Machine/settings.json fi -echo "👷 Running ${INSTALL_PREFIX}/bin/code-server serve-local --port ${PORT} --accept-server-license-terms serve-local --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." +echo "👷 Running ${INSTALL_PREFIX}/bin/code-server serve-local --port ${PORT} --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." echo "Check logs at ${LOG_PATH}!" -"${INSTALL_PREFIX}/bin/code-server" serve-local --port "${PORT}" --accept-server-license-terms serve-local --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & +"${INSTALL_PREFIX}/bin/code-server" serve-local --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 &