mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 08:40:58 +00:00
Merge pull request #2211 from arsaboo/header
chore: add HTTP-Referer and X-Title headers for Open WebUI
This commit is contained in:
commit
fabcbc300f
@ -116,7 +116,9 @@ async def speech(request: Request, user=Depends(get_verified_user)):
|
|||||||
headers = {}
|
headers = {}
|
||||||
headers["Authorization"] = f"Bearer {app.state.OPENAI_API_KEYS[idx]}"
|
headers["Authorization"] = f"Bearer {app.state.OPENAI_API_KEYS[idx]}"
|
||||||
headers["Content-Type"] = "application/json"
|
headers["Content-Type"] = "application/json"
|
||||||
|
if "openrouter.ai" in app.state.OPENAI_API_BASE_URLS[idx]:
|
||||||
|
headers['HTTP-Referer'] = "https://openwebui.com/"
|
||||||
|
headers['X-Title'] = "Open WebUI"
|
||||||
r = None
|
r = None
|
||||||
try:
|
try:
|
||||||
r = requests.post(
|
r = requests.post(
|
||||||
|
Loading…
Reference in New Issue
Block a user