File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,9 @@ def get_badge_base_url(self):
172
172
badge_base_url = self .settings ["badge_base_url" ]
173
173
if callable (badge_base_url ):
174
174
badge_base_url = badge_base_url (self )
175
+ # Make sure the url has a trailing slash
176
+ if not badge_base_url .endswith ("/" ):
177
+ badge_base_url += "/"
175
178
return badge_base_url
176
179
177
180
def render_template (self , name , ** extra_ns ):
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ const badge_base_url = document.getElementById("badge-base-url").dataset.url;
15
15
* Base URL to use for both badge images as well as launch links.
16
16
*
17
17
* If not explicitly set, will default to BASE_URL. Primarily set up different than BASE_URL
18
- * when used as part of a federation
18
+ * when used as part of a federation.
19
+ *
20
+ * Guaranteed to have a trailing slash by the binderhub python configuration.
19
21
*/
20
22
export const BADGE_BASE_URL = badge_base_url
21
23
? new URL ( badge_base_url , document . location . origin )
You can’t perform that action at this time.
0 commit comments