Skip to content

Commit

Permalink
Merge pull request #80 from keaplogik/default-credentials
Browse files Browse the repository at this point in the history
Default credentials to false for backwards CORS compatibility
  • Loading branch information
mikekelly authored Jul 7, 2016
2 parents 80fb441 + 4465b01 commit 7e70770
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/hal/http/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ HAL.Http.Client.prototype.get = function(url) {
url: url,
dataType: 'json',
xhrFields: {
withCredentials: true
withCredentials: false
},
headers: this.headers,
success: function(resource, textStatus, jqXHR) {
Expand All @@ -32,7 +32,7 @@ HAL.Http.Client.prototype.request = function(opts) {
var self = this;
opts.dataType = 'json';
opts.xhrFields = opts.xhrFields || {};
opts.xhrFields.withCredentials = opts.xhrFields.withCredentials || true;
opts.xhrFields.withCredentials = opts.xhrFields.withCredentials || false;
self.vent.trigger('location-change', { url: opts.url });
return jqxhr = $.ajax(opts);
};
Expand Down

0 comments on commit 7e70770

Please sign in to comment.