Skip to content

Commit ebe3998

Browse files
committed
Handle lack of trailing slashes in hub URLs
Without this, if your hub url was something like https://myhub.com/jupyter, your nbgitpuller URL will be something like https://myhub.com/jupyterhub/user-redirect... instead of https://myhub.com/jupyter/hub/user-redirect...
1 parent 22e2e27 commit ebe3998

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/_static/link_gen/link.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ function generateRegularUrl(hubUrl, urlPath, repoUrl, branch) {
1414
url.searchParams.set('branch', branch);
1515
}
1616

17+
if (!url.pathname.endsWith('/')) {
18+
url.pathname += '/'
19+
}
1720
url.pathname += 'hub/user-redirect/git-pull';
1821

1922
return url.toString();

0 commit comments

Comments
 (0)