Skip to content

Commit

Permalink
Clarify how build endpoint URL is constructed
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Oct 3, 2023
1 parent 17a3bf9 commit c2cf3d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion binderhub/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c2cf3d5

Please sign in to comment.