diff --git a/public/index.html b/public/index.html index 648e5c5..119684b 100644 --- a/public/index.html +++ b/public/index.html @@ -66,8 +66,7 @@ // --- API Calls --- // MODIFIED: This now points to the full server address, including the port. - const API_BASE_URL = `http://${window.location.hostname}:3000/api`; - + const API_BASE_URL = `${window.location.protocol}//${window.location.hostname}:3000/api`; async function apiCall(endpoint, method = 'GET', body = null) { const headers = { 'Content-Type': 'application/json' }; if (authToken) headers['Authorization'] = `Bearer ${authToken}`;