Skip to content

Commit ca9fd70

Browse files
authored
Merge pull request #9 from wearereasonablepeople/renan/add-long-timeout
Add long timeout and threat errors
2 parents 1021b79 + cfcb519 commit ca9fd70

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/proxy-web.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ const run = ({port, target, config = {}}) => {
1313
secure: false,
1414
changeOrigin: true,
1515
agent: new Agent({rejectUnauthorized: false || config.secure}),
16+
proxyTimeout: 1000 * 60 * 5,
17+
timeout: 1000 * 60 * 5,
1618
...config
1719
});
1820

@@ -28,6 +30,9 @@ const run = ({port, target, config = {}}) => {
2830
};
2931

3032
webProxy.on('proxyRes', web);
33+
webProxy.on('econnreset', () => log('Connection closed'));
34+
webProxy.on('error', err => log(`Connection error: ${err}`));
35+
3136
webProxy.listen(port);
3237
};
3338

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "warp-proxy",
3-
"version": "1.3.2",
3+
"version": "1.3.3",
44
"description": "Proxy requests or return mocks from local files instead",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)