mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-10 19:43:01 +00:00
Admin pages: use inherited base_url from render_template
This commit is contained in:
@@ -3,7 +3,7 @@ const base_url = jhdata.base_url || "/";
|
||||
const xsrfToken = jhdata.xsrf_token;
|
||||
|
||||
export const jhapiRequest = (endpoint, method, data) => {
|
||||
let api_url = new URL(`${base_url}hub/api` + endpoint, location.origin);
|
||||
let api_url = new URL(`${base_url}api` + endpoint, location.origin);
|
||||
if (xsrfToken) {
|
||||
api_url.searchParams.set("_xsrf", xsrfToken);
|
||||
}
|
||||
|
Reference in New Issue
Block a user