diff --git a/lightrag/api/static/js/api.js b/lightrag/api/static/js/api.js index effd73c2..86d8785d 100644 --- a/lightrag/api/static/js/api.js +++ b/lightrag/api/static/js/api.js @@ -17,11 +17,12 @@ const showToast = (message, duration = 3000) => { const fetchWithAuth = async (url, options = {}) => { const headers = { ...(options.headers || {}), - ...(state.apiKey ? { 'Authorization': `Bearer ${state.apiKey}` } : {}) + ...(state.apiKey ? { 'X-API-Key': state.apiKey } : {}) // Use X-API-Key instead of Bearer }; return fetch(url, { ...options, headers }); }; + // Page renderers const pages = { 'file-manager': () => `