-
-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
5.3.0
Plugin version
12.1.0
Node.js version
22.12.0
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
all
Description
Given the simple target and proxy service:
const target = fastify();
target.get('/', (request, reply) => {
setTimeout(() => {
reply.send('hello');
}, 5000);
});
target.listen({ port: 0 });
const proxy = fastify({
logger: true
});
proxy.register(fastifyReplyFrom);
proxy.addHook('onRequest', (request, reply) => {
return reply.from(`http://localhost:${target.server.address().port}/`);
});
proxy.listen({ port: 53347 })Send request to GET http://localhost:53347/ and abort it before the target answering
The proxy try to send answer after answering from the target
Link to code that reproduces the bug
Expected Behavior
A warning not happend