[7.x] [basePathProxy] auto-redirect space paths (#36300) (#36371)

This commit is contained in:
Spencer 2019-05-09 11:07:59 -07:00 committed by GitHub
parent 7056b98832
commit 116d998d4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,9 +252,13 @@ export default class ClusterManager {
}
shouldRedirectFromOldBasePath(path) {
// strip `s/{id}` prefix when checking for need to redirect
if (path.startsWith('s/')) {
path = path.split('/').slice(2).join('/');
}
const isApp = path.startsWith('app/');
const isKnownShortPath = ['login', 'logout', 'status'].includes(path);
return isApp || isKnownShortPath;
}