【发布时间】:2017-12-20 22:14:08
【问题描述】:
我有一个到 apache 服务器的 https 代理 apache 服务器位于节点代理后面 https://localhost:444
var httpsServer = https.createServer(options, function(req, res) {
sslproxy.web(req, res, {
target: "https://localhost:444"
});
}).listen(443);
当我使用浏览器浏览时,内容呈现正常。但是,如果我使用 redleg fileviewer https://aw-snap.info/file-viewer/ 之类的东西或通过 google 获取来获取页面,则内容为空,例如:
HTTP/1.1 200 正常
日期:格林威治标准时间 2017 年 12 月 20 日星期三 22:05:33
服务器:Apache/2.4.25 (Debian)
设置cookie:ct_cookies_test=aeeeadff0ae23e02715de88576a89e37;路径=/
x-frame-options: SAMEORIGIN
内容长度:0
连接:关闭
内容类型:文本/html;字符集=UTF-8
关于为什么 content-length 返回 0,但使用浏览器渲染可以吗?
【问题讨论】: