refac
This commit is contained in:
1 parent
d78c247036
commit
9907c0a25a
6 files changed
+58
-13
No files matched your search
@@ -62,7 +62,7 @@ from open_webui.utils.session_pool import (
|
||||
)
|
||||
|
||||
from open_webui.utils.auth import get_admin_user, get_verified_user
|
||||
from open_webui.utils.headers import include_user_info_headers
|
||||
from open_webui.utils.headers import include_user_info_headers, get_custom_headers
|
||||
from open_webui.utils.anthropic import is_anthropic_url, get_anthropic_models
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@@ -215,7 +215,8 @@ async def get_headers_and_cookies(
|
||||
headers['Authorization'] = f'Bearer {token}'
|
||||
|
||||
if config.get('headers') and isinstance(config.get('headers'), dict):
|
||||
headers = {**headers, **config.get('headers')}
|
||||
custom_headers = get_custom_headers(config.get('headers'), user, metadata)
|
||||
headers.update(custom_headers)
|
||||
|
||||
return headers, cookies
|
||||
|
||||
|
||||
Reference in new issue
Block a user