added error handling on http-proxy instance
このコミットが含まれているのは:
コミット
f569391cd9
@ -204,6 +204,13 @@ module.exports.create = function (deps, conf, greenlockMiddleware) {
|
||||
, toProxy: true
|
||||
});
|
||||
|
||||
proxy.on('error', function (err, req, res) {
|
||||
res.statusCode = 502;
|
||||
res.setHeader('Connection', 'close');
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
res.end(require('../proxy-conn').getRespBody(err, conf.debug));
|
||||
});
|
||||
|
||||
proxyServer = http.createServer(function (req, res) {
|
||||
proxy.web(req, res, req.connection.proxyOpts);
|
||||
});
|
||||
|
読み込み中…
x
新しいイシューから参照
ユーザーをブロックする