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:
parent
c7def85a4b
commit
294f1a001c
1 changed files with 5 additions and 3 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue