mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 19:37:47 +01:00
feat: Add option to forward user info as headers to OpenAI API
This commit is contained in:
@@ -422,6 +422,7 @@ OAUTH_ADMIN_ROLES = PersistentConfig(
|
||||
)
|
||||
|
||||
|
||||
|
||||
def load_oauth_providers():
|
||||
OAUTH_PROVIDERS.clear()
|
||||
if GOOGLE_CLIENT_ID.value and GOOGLE_CLIENT_SECRET.value:
|
||||
@@ -657,6 +658,12 @@ except Exception:
|
||||
|
||||
OPENAI_API_BASE_URL = "https://api.openai.com/v1"
|
||||
|
||||
OPENAI_FORWARD_USER_INFO_AS_HEADERS = PersistentConfig(
|
||||
"OPENAI_FORWARD_USER_INFO_AS_HEADERS",
|
||||
"oauth.OPENAI_FORWARD_USER_INFO_AS_HEADERS",
|
||||
os.environ.get("OPENAI_FORWARD_USER_INFO_AS_HEADERS", "False").lower() == "true",
|
||||
)
|
||||
|
||||
####################################
|
||||
# WEBUI
|
||||
####################################
|
||||
|
||||
Reference in New Issue
Block a user