2015: live: Fix cross-domain issue?
authorDavid Thompson <dthompson2@worcester.edu>
Sat, 21 Mar 2015 12:49:41 +0000 (08:49 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Sat, 21 Mar 2015 12:49:41 +0000 (08:49 -0400)
2015/assets/js/stream.js

index 43dc76c29e8a7492d3cf61041526485ded6ea35d..109a210b7a9decd1616744b57f8b61ddfa646aa8 100644 (file)
@@ -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('$'));