Skip to content

Commit 40178c3

Browse files
committed
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.
1 parent 95443d6 commit 40178c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = async function (fastify, opts) {
2424
fastify.all('/*', { beforeHandler }, reply)
2525

2626
function reply (request, reply) {
27-
var dest = request.raw.url.replace(this.basePath, '')
27+
var dest = request.req.url.replace(this.basePath, '')
2828
reply.from(dest)
2929
}
3030
}

0 commit comments

Comments
 (0)