diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 46d234d5..6e7ed6d5 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -1,6 +1,6 @@ WILCO_ID="`cat .wilco`" ENGINE_EVENT_ENDPOINT="${ENGINE_BASE_URL}/users/${WILCO_ID}/event" -CODESPACE_BACKEND_HOST="${CODESPACE_NAME}-3000.preview.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}" +CODESPACE_BACKEND_HOST=$(curl -s "${ENGINE_BASE_URL}/api/v1/codespace/backendHost?codespaceName=${CODESPACE_NAME}&portForwarding=${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}" | jq -r '.codespaceBackendHost') CODESPACE_BACKEND_URL="https://${CODESPACE_BACKEND_HOST}" # Update engine that codespace started for user