Fix CORS issue when avatar url is on S3

This commit is contained in:
Kenny Meyer 2015-02-26 18:34:37 -03:00
parent 7b92100a97
commit a89e3d0d14
1 changed files with 1 additions and 0 deletions

View File

@ -313,6 +313,7 @@ Discourse.Utilities = {
} else { } else {
return new Ember.RSVP.Promise(function(resolve) { return new Ember.RSVP.Promise(function(resolve) {
var image = document.createElement("img"); var image = document.createElement("img");
image.crossOrigin = 'Anonymous';
// this event will be fired as soon as the image is loaded // this event will be fired as soon as the image is loaded
image.onload = function(e) { image.onload = function(e) {
var img = e.target; var img = e.target;