From be11b26d7cc93482a29ea00a2515d40bdc2641fb Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 3 Sep 2021 00:54:54 -0700 Subject: [PATCH] fixup query --- docs/plugins/google-home/cast-receiver/cast.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/plugins/google-home/cast-receiver/cast.js b/docs/plugins/google-home/cast-receiver/cast.js index 813ede1e3..6caf92ecc 100644 --- a/docs/plugins/google-home/cast-receiver/cast.js +++ b/docs/plugins/google-home/cast-receiver/cast.js @@ -19,10 +19,15 @@ document.addEventListener("DOMContentLoaded", function (event) { const eioUrl = loadRequestData.media.entity || loadRequestData.media.contentId; const token = loadRequestData.credentials ?? loadRequestData.media.customData.token; const url = new URL(eioUrl) - const endpointPath = url.pathname + url.search; + const endpointPath = url.pathname; + const query = {} + for (const [k, v] of new URLSearchParams(url.search)) { + query[k] = v; + } const options = { path: endpointPath, + query, }; const socket = eio(`wss://${url.host}`, options);