mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
FIX: support /my routes with subfolders
This commit is contained in:
parent
aee316c6ff
commit
e7d8f5f9c8
@ -193,10 +193,10 @@ const DiscourseURL = Ember.Object.extend({
|
||||
path = path.replace(/(https?\:)?\/\/[^\/]+/, '');
|
||||
|
||||
// Rewrite /my/* urls
|
||||
if (path.indexOf('/my/') === 0) {
|
||||
if (path.indexOf(Discourse.BaseUri + '/my/') === 0) {
|
||||
const currentUser = Discourse.User.current();
|
||||
if (currentUser) {
|
||||
path = path.replace('/my/', userPath(currentUser.get('username_lower') + "/"));
|
||||
path = path.replace(Discourse.BaseUri + '/my/', userPath(currentUser.get('username_lower') + "/"));
|
||||
} else {
|
||||
document.location.href = "/404";
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user