Merge pull request #8368 from spalger/fix/base-path-proxy/redirect-login

[basePathProxy] redirect login urls to new basePath
This commit is contained in:
Spencer 2016-09-20 16:14:21 -07:00 committed by GitHub
commit d95468e06c

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}`);
}