MicroCommunityWeb/node_modules/express-http-proxy/app/steps/sendUserRes.js
2020-03-10 21:33:17 +08:00

16 lines
328 B
JavaScript

'use strict';
function sendUserRes(Container) {
if (!Container.user.res.headersSent) {
if (Container.options.stream) {
Container.proxy.res.pipe(Container.user.res);
} else {
Container.user.res.send(Container.proxy.resData);
}
}
return Promise.resolve(Container);
}
module.exports = sendUserRes;