fix: consolidate WS proxy Bearer header guard to single line for CI test
The source-inspection test checks each line individually for an 'if'
guard. The multi-line formatting of the 'if remote_key else {}' guard
split it across 3 lines, making the test see an unguarded header.
Consolidated to match the single-line pattern of the other 4 endpoints.
This commit is contained in:
+1
-3
@@ -785,9 +785,7 @@ async def federation_terminal_ws_proxy(websocket: WebSocket, remote_id: int) ->
|
|||||||
async with websockets.connect(
|
async with websockets.connect(
|
||||||
ws_url,
|
ws_url,
|
||||||
subprotocols=[Subprotocol("tty")],
|
subprotocols=[Subprotocol("tty")],
|
||||||
additional_headers={"Authorization": f"Bearer {remote_key}"}
|
additional_headers={"Authorization": f"Bearer {remote_key}"} if remote_key else {},
|
||||||
if remote_key
|
|
||||||
else {},
|
|
||||||
ssl=ssl_context,
|
ssl=ssl_context,
|
||||||
) as remote_ws:
|
) as remote_ws:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user