This repository was archived by the owner on Feb 2, 2024. It is now read-only.
Supporting optional request timeout configuration
Optional timeout option can be passed during proxy:
gateway.all('/service/*', function (req, res) {
proxy(req, res, req.url, {
request: {
timeout: 3000 // if target exceeds 3 seconds to respond, the gateway will timeout with 504 code
}
})
})