mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[server] add baseUrl to /app/kibana redirects
This commit is contained in:
parent
1cfa5f632f
commit
f7bc4da49a
2 changed files with 4 additions and 5 deletions
|
@ -1,11 +1,10 @@
|
|||
let _ = require('lodash');
|
||||
|
||||
module.exports = _.once(function (kbnServer) {
|
||||
const { uiExports, config } = kbnServer;
|
||||
// user configured default route
|
||||
let defaultConfig = kbnServer.config.get('server.defaultRoute');
|
||||
let defaultConfig = config.get('server.defaultRoute');
|
||||
if (defaultConfig) return defaultConfig;
|
||||
|
||||
// redirect to the single app
|
||||
let apps = kbnServer.uiExports.apps.toArray();
|
||||
return '/app/kibana';
|
||||
return `${config.get('basePath')}/app/kibana`;
|
||||
});
|
||||
|
|
|
@ -99,7 +99,7 @@ module.exports = function (kbnServer, server, config) {
|
|||
method: 'GET',
|
||||
handler: function (req, reply) {
|
||||
return reply.view('rootRedirect', {
|
||||
hashRoute: '/app/kibana',
|
||||
hashRoute: `${config.get('basePath')}/app/kibana`,
|
||||
defaultRoute: getDefaultRoute(kbnServer),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue