Actually the question is in the header. A REST endpoint definition is below:
fastify.get('/dir/:path', async (request, reply) => {
let res = await remote.getDir(request.params.path);
return { res: res };
});
And a call is like
The problem is that Fastify treats the path parameter as continuation of the URL, and says: "Route GET:/dir// not found"