I used to have this code to specify proxy for request handler in the legacy Kibana plugin.
server.route({
path: '/api/myplugin/{path*}',
method: ['GET', 'POST', 'DELETE'],
handler: {
proxy: {
mapUri: request => {
return { uri: `${baseUri}/${request.params.path || ''}` };
}
}
}
});
How can I do this with new Kibana router?