[basePathProxy] redirect login urls to new basePath

This commit is contained in:
spalger 2016-09-19 21:33:53 -07:00
parent cd4e1dc7de
commit e8db02577b

View file

@ -109,9 +109,10 @@ export default class BasePathProxy {
const isGet = req.method === 'get';
const isBasePath = oldBasePath.length === 3;
const isApp = kbnPath.slice(0, 4) === 'app/';
const isApp = kbnPath.startsWith('app/');
const isKnownShortPath = ['login', 'logout', 'status'].includes(kbnPath);
if (isGet && isBasePath && isApp) {
if (isGet && isBasePath && (isApp || isKnownShortPath)) {
return reply.redirect(`${basePath}/${kbnPath}`);
}