From 40178c3dc0e2fc780125b10bf5d47ef969a07888 Mon Sep 17 00:00:00 2001 From: Stefan Mirck Date: Mon, 26 Feb 2018 10:50:20 +0100 Subject: [PATCH] Bugfix: backwards compatibility for fastify 0.x. Changed `request.raw` to `request.req` in order to provide backwards compatibility for pre-v1 versions of Fastify. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index b89ccbe..cf4ca13 100644 --- a/index.js +++ b/index.js @@ -24,7 +24,7 @@ module.exports = async function (fastify, opts) { fastify.all('/*', { beforeHandler }, reply) function reply (request, reply) { - var dest = request.raw.url.replace(this.basePath, '') + var dest = request.req.url.replace(this.basePath, '') reply.from(dest) } }