From 733679936ac62d0d11b8a46c48d0ce0d0e6fa2e1 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Sat, 26 Sep 2015 10:30:09 +0100 Subject: Enable CORS properly --- js/main.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/main.js') 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'); -- cgit v1.2.1