server: avoid overwriting Authorization header
If no API key is set, leave the Authorization header as is. It may be used by another part of the Web stack, such as an authenticating proxy. Fixes https://github.com/ggerganov/llama.cpp/issues/10854
This commit is contained in:
parent
4da69d1abd
commit
bfa0298900
2 changed files with 1 additions and 1 deletions
Binary file not shown.
|
@ -445,7 +445,7 @@ const mainApp = createApp({
|
|||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': this.config.apiKey ? `Bearer ${this.config.apiKey}` : undefined,
|
||||
...(this.config.apiKey ? {'Authorization': `Bearer ${this.config.apiKey}`} : {})
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
signal: abortController.signal,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue