Skip to content

Commit

Permalink
Fixed Ajax CORS requests
Browse files Browse the repository at this point in the history
  • Loading branch information
schahriar committed Nov 24, 2015
1 parent 49ee0a0 commit c036036
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ window._ = _;
window.moment = moment;
window.root = '/api';

// Force CORS options on all Ajax Requests
$.ajaxPrefilter( function( options, originalOptions, jqXHR ) {
options.crossDomain ={
crossDomain: true
};
options.xhrFields = {
withCredentials: true
};
});

var unknown = "unknown", no = false, yes = true, fail = false, pass = true, empty = "";

var access = require('./access');
Expand Down

0 comments on commit c036036

Please sign in to comment.