Skip to content

Commit

Permalink
fixed crash issue
Browse files Browse the repository at this point in the history
  • Loading branch information
netptop committed Mar 11, 2020
1 parent ffcb3b5 commit a1d9967
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,12 @@ let Proxy = ({urlModify, httpprefix, serverName, port, cookieDomainRewrite, loca
logSave(`skip header:${key}`)
return
}
// res.append(key, proxyRes.headers[key]);
res.setHeader(key, proxyRes.headers[key]);
try {
res.setHeader(key, proxyRes.headers[key]);
} catch(e) {
logSave(`error:${e}`)
return
}
});
res.statusCode = proxyRes.statusCode
logSave(`res.status:${res.statusCode} res.url:${res.url}, res.headers:${JSON.stringify(res.getHeaders())}`)
Expand Down

0 comments on commit a1d9967

Please sign in to comment.