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
1 changed files with 1 additions and 1 deletions

View File

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