summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam@sotk.co.uk>2015-09-26 10:30:09 +0100
committerAdam Coldrick <adam@sotk.co.uk>2015-09-28 20:12:38 +0100
commit733679936ac62d0d11b8a46c48d0ce0d0e6fa2e1 (patch)
treec5a12ef12f3880c34a226a0db55dcb0ddb333159
parent00e24462beb1f972900561e527bc601affe59aca (diff)
downloadciat-ui-733679936ac62d0d11b8a46c48d0ce0d0e6fa2e1.tar.gz
Enable CORS properly
-rw-r--r--js/main.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/main.js b/js/main.js
index 398d06c..fb1486e 100644
--- a/js/main.js
+++ b/js/main.js
@@ -1,5 +1,11 @@
var app = angular.module('ciat', []);
+app.config(['$httpProvider', function($httpProvider) {
+ $httpProvider.defaults.useXDomain = true;
+ delete $httpProvider.defaults.headers.common['X-Requested-With'];
+ }
+]);
+
app.controller('VisualisationController', ['$scope', '$http',
function($scope, $http) {
$scope.builders = $http.get('http://ciat.baserock.org:8010/json/builders');