From b05841a562bbda16c5e3619d26b2f37eeb7f8af1 Mon Sep 17 00:00:00 2001 From: Niccolo Borgioli Date: Tue, 23 May 2023 09:37:33 +0200 Subject: [PATCH] add timeout --- packages/proxy/proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/proxy/proxy.js b/packages/proxy/proxy.js index 0173cc4..7e5292f 100644 --- a/packages/proxy/proxy.js +++ b/packages/proxy/proxy.js @@ -10,7 +10,7 @@ proxy.on('error', function (err, req, res) { const server = http.createServer(function (req, res) { const target = req.url.startsWith('/api/') ? 'http://127.0.0.1:8000' : 'http://localhost:8001' - proxy.web(req, res, { target }) + proxy.web(req, res, { target, proxyTimeout: 250, timeout: 250 }) }) server.listen(1234) console.log('Proxy on http://localhost:1234')