Skip to content

Commit

Permalink
Use window.location.href as base, not window.location.origin
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Oct 3, 2023
1 parent 58d79c2 commit 17a3bf9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion binderhub/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ function build(providerSpec, log, fitAddon, path, pathType) {
$('.on-build').removeClass('hidden');

const buildToken = $("#build-token").data('token');
const buildEndpointUrl = new URL("build", new URL(BASE_URL, window.location.origin));
// If BASE_URL is absolute, use that. Else, resolve it relative to current URL
const buildEndpointUrl = new URL("build", new URL(BASE_URL, window.location.href));
const image = new BinderRepository(providerSpec, buildEndpointUrl, buildToken);

image.onStateChange('*', function(oldState, newState, data) {
Expand Down

0 comments on commit 17a3bf9

Please sign in to comment.