我们有下一个架构: Angular 应用 -> AWS API 网关 -> 微服务(node.js)
用户点击取消按钮进行一些缓慢的处理。前端角度应用取消 http 请求。但是 node.js 应用程序没有看到请求已关闭
req.on('close', err => { // we also checked with 'aborted' event
if (!err) {
console.log('request was closed') // <-- doesn't get called
}
})
我猜是因为我们使用了 api 网关。但是如何教它将请求取消转发到node.js?
API 网关 error handling doc 不是很有帮助。