Skip to content

Commit

Permalink
Merge pull request #649 from soichisumi/fix-webui-auth
Browse files Browse the repository at this point in the history
Fix: WebUI Auth
  • Loading branch information
LarFii authored Jan 26, 2025
2 parents 2d033c9 + 763b321 commit 2cd4fc0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lightrag/api/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ <h3 class="text-lg font-semibold text-slate-900 mb-4">System Health</h3>
const response = await fetch('/documents/upload', {
method: 'POST',
headers: {
'Authorization': `Bearer ${localStorage.getItem('apiKey') || ''}`
'X-API-Key': `${localStorage.getItem('apiKey') || ''}`
},
body: formData
});
Expand Down Expand Up @@ -486,7 +486,7 @@ <h3 class="text-lg font-semibold text-slate-900 mb-4">System Health</h3>
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${localStorage.getItem('apiKey') || ''}`
'X-API-Key': `${localStorage.getItem('apiKey') || ''}`
},
body: JSON.stringify({ query })
});
Expand Down Expand Up @@ -614,7 +614,7 @@ <h4 class="text-sm font-medium text-slate-700 mb-2">Sources:</h4>
try {
const response = await fetch('/health', {
headers: {
'Authorization': `Bearer ${localStorage.getItem('apiKey')}`
'X-API-Key': `${localStorage.getItem('apiKey')}`
}
});

Expand Down Expand Up @@ -679,7 +679,7 @@ <h4 class="font-medium mb-2">Configuration</h4>
const response = await fetch('/documents/upload', {
method: 'POST',
headers: {
'Authorization': `Bearer ${localStorage.getItem('apiKey')}`
'X-API-Key': `${localStorage.getItem('apiKey')}`
},
body: formData
});
Expand Down

0 comments on commit 2cd4fc0

Please sign in to comment.