Browse Source

chore: add HTTP-Referer and X-Title headers for Open WebUI

Alok Saboo 11 months ago
parent
commit
6671e5f170
1 changed files with 2 additions and 0 deletions
  1. 2 0
      backend/apps/openai/main.py

+ 2 - 0
backend/apps/openai/main.py

@@ -116,6 +116,8 @@ async def speech(request: Request, user=Depends(get_verified_user)):
         headers = {}
         headers["Authorization"] = f"Bearer {app.state.OPENAI_API_KEYS[idx]}"
         headers["Content-Type"] = "application/json"
+        headers['HTTP-Referer'] = "https://openwebui.com/"
+        headers['X-Title'] = "Open WebUI"
 
         r = None
         try: