diff --git a/lib/swsInterface.js b/lib/swsInterface.js index 27551e2..a01e329 100644 --- a/lib/swsInterface.js +++ b/lib/swsInterface.js @@ -172,9 +172,9 @@ function fastifyPlugin (fastify, opts, done) { // TODO Headers //let h = Object.getOwnPropertySymbols(reply); //let hh = reply[headersSymbol]; - // Set route_path as reply.context.config.url - if(('context' in reply) && ('config' in reply.context) && ('url' in reply.context.config)){ - request.raw.sws.route_path = reply.context.config.url; + // Set route_path as reply.routeOptions.config.url + if(('routeOptions' in reply) && ('config' in reply.routeOptions) && ('url' in reply.routeOptions.config)){ + request.raw.sws.route_path = reply.routeOptions.config.url; } done() });