fix(teamsbot): Use APP_API_URL for WebSocket URL to ensure https/wss

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
patrick-motsch 2026-02-15 00:12:45 +01:00
parent c7def85a4b
commit 294f1a001c

View file

@ -122,9 +122,11 @@ async def startSession(
createdSession = interface.createSession(sessionData) createdSession = interface.createSession(sessionData)
sessionId = createdSession.get("id") sessionId = createdSession.get("id")
# Derive gateway base URL from the incoming request so the bridge # Use APP_API_URL from global config for the gateway base URL
# can build full callback/WS URLs targeting this specific gateway instance. # request.base_url can be http:// behind a reverse proxy even when client uses https://
gatewayBaseUrl = str(request.base_url).rstrip("/") from modules.shared.configuration import APP_CONFIG
appApiUrl = APP_CONFIG.get("APP_API_URL", "")
gatewayBaseUrl = appApiUrl.rstrip("/") if appApiUrl else str(request.base_url).rstrip("/")
# Start the bot in background (join meeting via bridge) # Start the bot in background (join meeting via bridge)
service = TeamsbotService(context.user, mandateId, instanceId, config) service = TeamsbotService(context.user, mandateId, instanceId, config)