Skip to content

Commit 09d4ccc

Browse files
committed
refac
1 parent 9a772f4 commit 09d4ccc

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

backend/open_webui/utils/terminals.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
def get_terminal_server_url(connection: dict) -> str:
77
"""Return the upstream base URL for a terminal connection.
88
9-
Only orchestrator connections with an explicit policy use the named-policy
10-
route. Direct Open Terminal connections and legacy unscoped orchestrator
11-
connections keep their existing root route.
9+
An explicit policy uses the named-policy route. Connections without one
10+
keep their existing root route.
1211
"""
1312
base_url = str(connection.get('url') or '').rstrip('/')
1413
policy_id = str(connection.get('policy_id') or '').strip()
15-
if connection.get('server_type') == 'orchestrator' and policy_id:
14+
if policy_id:
1615
return f'{base_url}/p/{quote(policy_id, safe="")}'
1716
return base_url

0 commit comments

Comments
 (0)