mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Merge branch 'dbkr/fix_redirect_path' into 'element'
Fix pathname for riot.im redirects See merge request new-vector/element/element-web/matrix-react-sdk!26
This commit is contained in:
commit
683935856b
@ -40,10 +40,13 @@ function getRedirectUrl(url): string {
|
||||
} else if (url.hostname === 'riot.im') {
|
||||
if (url.pathname.startsWith('/app')) {
|
||||
redirectUrl.hostname = 'app.element.io';
|
||||
redirectUrl.pathname = '/';
|
||||
} else if (url.pathname.startsWith('/staging')) {
|
||||
redirectUrl.hostname = 'staging.element.io';
|
||||
redirectUrl.pathname = '/';
|
||||
} else if (url.pathname.startsWith('/develop')) {
|
||||
redirectUrl.hostname = 'develop.element.io';
|
||||
redirectUrl.pathname = '/';
|
||||
}
|
||||
|
||||
return redirectUrl.href;
|
||||
|
Loading…
Reference in New Issue
Block a user