diff --git a/modules/features/teamsbot/routeFeatureTeamsbot.py b/modules/features/teamsbot/routeFeatureTeamsbot.py index 997b9a58..14ccfa18 100644 --- a/modules/features/teamsbot/routeFeatureTeamsbot.py +++ b/modules/features/teamsbot/routeFeatureTeamsbot.py @@ -122,9 +122,11 @@ async def startSession( createdSession = interface.createSession(sessionData) sessionId = createdSession.get("id") - # Derive gateway base URL from the incoming request so the bridge - # can build full callback/WS URLs targeting this specific gateway instance. - gatewayBaseUrl = str(request.base_url).rstrip("/") + # Use APP_API_URL from global config for the gateway base URL + # request.base_url can be http:// behind a reverse proxy even when client uses https:// + 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) service = TeamsbotService(context.user, mandateId, instanceId, config)