From c2cf3d540a400cefdbc7cf1d99abb13aa8adddd2 Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Mon, 2 Oct 2023 20:56:47 -0700 Subject: [PATCH] Clarify how build endpoint URL is constructed --- binderhub/static/js/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/binderhub/static/js/index.js b/binderhub/static/js/index.js index 3971e3eaf..3d1b61963 100644 --- a/binderhub/static/js/index.js +++ b/binderhub/static/js/index.js @@ -160,7 +160,9 @@ function build(providerSpec, log, fitAddon, path, pathType) { $('.on-build').removeClass('hidden'); const buildToken = $("#build-token").data('token'); - // If BASE_URL is absolute, use that. Else, resolve it relative to current URL + // If BASE_URL is absolute, use that as the base for build endpoint URL. + // Else, first resolve BASE_URL relative to current URL, then use *that* as the + // base for the build endpoint url. const buildEndpointUrl = new URL("build", new URL(BASE_URL, window.location.href)); const image = new BinderRepository(providerSpec, buildEndpointUrl, buildToken);