Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.

Commit

Permalink
Check cross origin setting when load image by xhr
Browse files Browse the repository at this point in the history
Fixed #669
  • Loading branch information
fengyuanchen committed May 28, 2016
1 parent 4dc3e14 commit 745d790
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
read(this.response);
};

if (options.checkCrossOrigin && isCrossOriginURL(url) && $this.prop('crossOrigin')) {
url = addTimestamp(url);
}

xhr.open('get', url);
xhr.responseType = 'arraybuffer';
xhr.send();
Expand Down

0 comments on commit 745d790

Please sign in to comment.