#How can I reliably detect when a POST request is aborted by the client in NestJS?
3 messages · Page 1 of 1 (latest)
That would depend on the http driver you are using. Here's how to check for aborted requests in fastify: https://fastify.dev/docs/latest/Guides/Detecting-When-Clients-Abort/
Introduction
I’m using Express as the HTTP driver in NestJS, and I’ve noticed that the http-proxy-middleware seems to hide or override the req events. Specifically, I cannot detect the aborted event on the original request because the middleware proxies the request and prevents it from emitting the standard event.
Is there any way to pass through the req events or listen for the aborted event in combination with http-proxy-middleware?