kopia lustrzana https://github.com/c9/core
fix broken ssh preview
rodzic
82b64cecc5
commit
fc55d21014
|
@ -122,8 +122,6 @@ define(function(require, exports, module) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var url = server + "/" + req.projectSession.pid + "/preview";
|
var url = server + "/" + req.projectSession.pid + "/preview";
|
||||||
if (req.session.token)
|
|
||||||
url += "?access_token=" + encodeURIComponent(req.session.token);
|
|
||||||
|
|
||||||
req.proxyUrl = url;
|
req.proxyUrl = url;
|
||||||
next();
|
next();
|
||||||
|
@ -135,6 +133,8 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
var path = req.params.path;
|
var path = req.params.path;
|
||||||
var url = req.proxyUrl + path;
|
var url = req.proxyUrl + path;
|
||||||
|
if (req.session.token)
|
||||||
|
url += "?access_token=" + encodeURIComponent(req.session.token);
|
||||||
|
|
||||||
var parsedUrl = parseUrl(url);
|
var parsedUrl = parseUrl(url);
|
||||||
var httpModule = parsedUrl.protocol == "https:" ? https : http;
|
var httpModule = parsedUrl.protocol == "https:" ? https : http;
|
||||||
|
|
Ładowanie…
Reference in New Issue