From a89e3d0d14b49236ae16bec6d8b4d6a703e6d376 Mon Sep 17 00:00:00 2001 From: Kenny Meyer Date: Thu, 26 Feb 2015 18:34:37 -0300 Subject: [PATCH] Fix CORS issue when avatar url is on S3 --- app/assets/javascripts/discourse/lib/utilities.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/discourse/lib/utilities.js b/app/assets/javascripts/discourse/lib/utilities.js index 266ed03ba64..9f7832cf468 100644 --- a/app/assets/javascripts/discourse/lib/utilities.js +++ b/app/assets/javascripts/discourse/lib/utilities.js @@ -313,6 +313,7 @@ Discourse.Utilities = { } else { return new Ember.RSVP.Promise(function(resolve) { var image = document.createElement("img"); + image.crossOrigin = 'Anonymous'; // this event will be fired as soon as the image is loaded image.onload = function(e) { var img = e.target;