Rewrite origin so it matches original behavior

As suggested by @nlalonde
This commit is contained in:
Rafael dos Santos Silva 2015-09-14 18:29:39 -03:00
parent 983d3606df
commit 4e39f9662d

View file

@ -271,7 +271,7 @@ const DiscourseURL = Ember.Object.createWithMixins({
// This has been extracted so it can be tested. // This has been extracted so it can be tested.
origin: function() { origin: function() {
return Discourse.BaseUrl + Discourse.BaseUri; return window.location.origin + (Discourse.BaseUri === "/" ? '' : Discourse.BaseUri);
}, },
/** /**