Fix pathname for riot.im redirects
Need to redirect to root on x.element.iopull/21833/head
parent
aea3a8de8d
commit
e8700392b5
|
@ -40,10 +40,13 @@ function getRedirectUrl(url): string {
|
||||||
} else if (url.hostname === 'riot.im') {
|
} else if (url.hostname === 'riot.im') {
|
||||||
if (url.pathname.startsWith('/app')) {
|
if (url.pathname.startsWith('/app')) {
|
||||||
redirectUrl.hostname = 'app.element.io';
|
redirectUrl.hostname = 'app.element.io';
|
||||||
|
redirectUrl.pathname = '/';
|
||||||
} else if (url.pathname.startsWith('/staging')) {
|
} else if (url.pathname.startsWith('/staging')) {
|
||||||
redirectUrl.hostname = 'staging.element.io';
|
redirectUrl.hostname = 'staging.element.io';
|
||||||
|
redirectUrl.pathname = '/';
|
||||||
} else if (url.pathname.startsWith('/develop')) {
|
} else if (url.pathname.startsWith('/develop')) {
|
||||||
redirectUrl.hostname = 'develop.element.io';
|
redirectUrl.hostname = 'develop.element.io';
|
||||||
|
redirectUrl.pathname = '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirectUrl.href;
|
return redirectUrl.href;
|
||||||
|
|
Loading…
Reference in New Issue