mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Add basepath when redirecting from a trailling slash (#8966)
This commit is contained in:
parent
60e62c7ad2
commit
62368435ed
1 changed files with 2 additions and 2 deletions
|
@ -103,10 +103,10 @@ module.exports = async function (kbnServer, server, config) {
|
|||
if (path === '/' || path.charAt(path.length - 1) !== '/') {
|
||||
return reply(Boom.notFound());
|
||||
}
|
||||
|
||||
const pathPrefix = config.get('server.basePath') ? `${config.get('server.basePath')}/` : '';
|
||||
return reply.redirect(format({
|
||||
search: req.url.search,
|
||||
pathname: path.slice(0, -1),
|
||||
pathname: pathPrefix + path.slice(0, -1),
|
||||
}))
|
||||
.permanent(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue