mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
refac
This commit is contained in:
parent
fe3300bd65
commit
d6cda4a04b
1 changed files with 2 additions and 2 deletions
|
|
@ -1126,7 +1126,7 @@ async def set_terminal_servers(request: Request):
|
|||
server_configs.append(
|
||||
{
|
||||
'url': base_url,
|
||||
'key': connection.get('key', ''),
|
||||
'key': normalize_bearer_token(connection.get('key', '')),
|
||||
'auth_type': connection.get('auth_type', 'bearer'),
|
||||
'path': connection.get('path', '/openapi.json'),
|
||||
'spec_type': 'url',
|
||||
|
|
@ -1358,7 +1358,7 @@ async def get_tool_servers_data(servers: list[dict[str, Any]]) -> list[dict[str,
|
|||
# Fetch from URL
|
||||
task = get_tool_server_data(
|
||||
spec_url,
|
||||
bearer_auth_header(token) or None,
|
||||
{'Authorization': f'Bearer {token}'} if token else None,
|
||||
)
|
||||
elif spec_type == 'json' and server.get('spec', ''):
|
||||
# Use provided JSON spec
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue