这是一个创建于 4100 天前的主题,其中的信息可能已经有所发展或是发生改变。
var http = require('http');
http.createServer(function(request, response) {
var proxyRequest = http.request({
host: request.headers['host'],
port: 80,
path: request.url,
method: request.method,
headers: request.headers
}, function(proxyResponse) {
console.log(proxyResponse.headers);
response.writeHead(proxyResponse.statusCode, proxyResponse.headers);
proxyResponse.pipe(response);
});
request.pipe(proxyRequest);
}).listen(8080);
请问怎么修改proxyResponse的html?