diff options
author | Adam Coldrick <adam@sotk.co.uk> | 2015-09-26 10:30:09 +0100 |
---|---|---|
committer | Adam Coldrick <adam@sotk.co.uk> | 2015-09-28 20:12:38 +0100 |
commit | 733679936ac62d0d11b8a46c48d0ce0d0e6fa2e1 (patch) | |
tree | c5a12ef12f3880c34a226a0db55dcb0ddb333159 | |
parent | 00e24462beb1f972900561e527bc601affe59aca (diff) | |
download | ciat-ui-733679936ac62d0d11b8a46c48d0ce0d0e6fa2e1.tar.gz |
Enable CORS properly
-rw-r--r-- | js/main.js | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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'); |