From e9591548b4de480f07f439a86f76f4e1b1d22387 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Fri, 31 Jan 2025 16:03:31 +0100 Subject: [PATCH] Update api.js --- lightrag/api/static/js/api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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': () => `