diff --git a/services/jupyterhub/templates_enhanced/admin.html b/services/jupyterhub/templates_enhanced/admin.html index 0fe618f..31cfbaa 100644 --- a/services/jupyterhub/templates_enhanced/admin.html +++ b/services/jupyterhub/templates_enhanced/admin.html @@ -79,8 +79,10 @@ console.log('[Admin Fetch]', method, url); - // Check for user creation - const isUserCreation = method === 'POST' && url.includes('api/users') && !url.includes('?'); + // Check for user creation - POST to api/users (may have ?_xsrf query param) + // Exclude URLs with other query params like include_stopped_servers + const urlPath = url.split('?')[0]; + const isUserCreation = method === 'POST' && urlPath.endsWith('api/users'); // Capture request body before fetch (for batch user creation) let requestUsernames = []; diff --git a/services/jupyterhub/templates_enhanced/page.html b/services/jupyterhub/templates_enhanced/page.html index 9b757f3..5f3c2b4 100644 --- a/services/jupyterhub/templates_enhanced/page.html +++ b/services/jupyterhub/templates_enhanced/page.html @@ -151,11 +151,11 @@ Admin {% endif %} {% if services %}