-
-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
fastify/fastify-websocket
#122Description
🐛 Bug Report
When using fastify-http-proxy, the library does not remove the prefix from the request URL before proxying it to the upstream.
To Reproduce
Steps to reproduce the behavior:
fastify.register(require('fastify-http-proxy'), {
upstream: 'example.com',
prefix: 'testprefix'
});
fastify.listen(3005, '0.0.0.0', function (err, address) {
if (err) {
fastify.log.error(err)
process.exit(1)
}
fastify.log.info(`server listening on ${address}`)
});
For the request /testprefix/users
, the upstream receives /testprefix/users
instead of /users
.
Expected behavior
The prefix should be removed from the URL before proxying it to the upstream.
Your Environment
- node version: 14
- fastify version: >=3.14.2
- os: Windows
Metadata
Metadata
Assignees
Labels
No labels