import type { IBasePath , KibanaRequest } from 'src/core/server' ; import type { IBasePath as BasePathAccessor } from '../../common/utils' ; export const getRequestBasePath = ( request , basePath ) : BasePathAccessor => { const requestBasePath = basePath . get ( request ) ; return { prepend : ( path ) => { return `${ requestBasePath }/${ path }` . replace ( /\/{2,}/g , '/' ) ; } , } ; } ;