mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[dist minor] 2 space indents next time @samalba
This commit is contained in:
parent
8332e74420
commit
7e8041d2b6
@ -239,7 +239,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
|
|||||||
if (this.changeOrigin) {
|
if (this.changeOrigin) {
|
||||||
outgoing.headers.host = this.target.host;
|
outgoing.headers.host = this.target.host;
|
||||||
// Only add port information to the header if not default port
|
// Only add port information to the header if not default port
|
||||||
// for this protocol.
|
// for this protocol.
|
||||||
// See https://github.com/nodejitsu/node-http-proxy/issues/458
|
// See https://github.com/nodejitsu/node-http-proxy/issues/458
|
||||||
if (this.target.port !== 443 && this.target.https ||
|
if (this.target.port !== 443 && this.target.https ||
|
||||||
this.target.port !== 80 && !this.target.https) {
|
this.target.port !== 80 && !this.target.https) {
|
||||||
@ -334,10 +334,10 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
|
|||||||
|
|
||||||
// Set the headers of the client response
|
// Set the headers of the client response
|
||||||
if (res.sentHeaders !== true) {
|
if (res.sentHeaders !== true) {
|
||||||
Object.keys(response.headers).forEach(function (key) {
|
Object.keys(response.headers).forEach(function (key) {
|
||||||
res.setHeader(key, response.headers[key]);
|
res.setHeader(key, response.headers[key]);
|
||||||
});
|
});
|
||||||
res.writeHead(response.statusCode);
|
res.writeHead(response.statusCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ondata(chunk) {
|
function ondata(chunk) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user