fix: forward session_id and user_id query params through WebSocket proxy

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-03-16 13:25:45 -03:00
parent bd7ae3b565
commit 281d5aed2e

View file

@ -848,13 +848,15 @@ async fn handle_ws_proxy(
) {
let bot_name = params.bot_name.unwrap_or_else(|| "default".to_string());
let backend_url = format!(
"{}/ws/{}",
"{}/ws/{}?session_id={}&user_id={}",
state
.client
.base_url()
.replace("https://", "wss://")
.replace("http://", "ws://"),
bot_name
bot_name,
params.session_id,
params.user_id
);
info!("Proxying WebSocket to: {backend_url}");