From: David Thompson Date: Sat, 21 Mar 2015 12:49:41 +0000 (-0400) Subject: 2015: live: Fix cross-domain issue? X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=79f452d974313baaaf00b8afa0a5d2eb1f94aeb2;p=libreplanet-static.git 2015: live: Fix cross-domain issue? --- diff --git a/2015/assets/js/stream.js b/2015/assets/js/stream.js index 43dc76c2..109a210b 100644 --- a/2015/assets/js/stream.js +++ b/2015/assets/js/stream.js @@ -40,12 +40,17 @@ app.nullStats = { server_description: null }; +app.publicApi = function(xhr) { + xhr.withCredentials = false; +}; + app.streamStats = function(mount) { var statsUrl = app.icecastApiUrl.concat('/status-json.xsl'); return m.request({ method: "GET", - url: statsUrl + url: statsUrl, + config: app.publicApi }).then(function(data) { // Match the end of the listen URL for the mount point. var regexp = new RegExp(mount.concat('$'));