mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
minor changes
This commit is contained in:
parent
cb4a0da345
commit
3df7d0dba6
2 changed files with 10 additions and 6 deletions
|
|
@ -74,11 +74,13 @@ var CloudCommander, Util, DOM, CodeMirror;
|
|||
lineWrapping: false,
|
||||
autofocus : true,
|
||||
extraKeys: {
|
||||
//Сохранение
|
||||
/* Exit */
|
||||
'Esc': function(){
|
||||
Util.exec(pParams);
|
||||
DOM.remove(lCSS, document.head);
|
||||
},
|
||||
|
||||
/* Save */
|
||||
'Ctrl-S': function(){
|
||||
var lValue = lEditor.getValue();
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@
|
|||
|
||||
lSSL = pProcessing.ssl,
|
||||
lSSLPort = lConfig.sslPort,
|
||||
lHTTP = 'http://',
|
||||
lHTTPS = 'https://',
|
||||
|
||||
lSockets = function(pServer){
|
||||
var lListen;
|
||||
|
|
@ -91,24 +93,24 @@
|
|||
Util.log(pError);
|
||||
});
|
||||
Server.listen(lPort, lIP);
|
||||
lServerLog('http', lPort);
|
||||
lServerLog(lHTTP, lPort);
|
||||
lSockets(Server);
|
||||
},
|
||||
|
||||
lServerLog = function(pHTTP, pPort){
|
||||
Util.log('* Server running at ' + pHTTP + '://' + lIP + ':' + pPort);
|
||||
Util.log('* Server running at ' + pHTTP + lIP + ':' + pPort);
|
||||
};
|
||||
/* server mode or testing mode */
|
||||
if (lConfig.server) {
|
||||
if(lSSL){
|
||||
Util.log('* Redirection http -> https is setted up');
|
||||
lServerLog('http', lPort);
|
||||
lServerLog(lHTTP, lPort);
|
||||
var lRedirectServer = http.createServer( function(pReq, pRes){
|
||||
var lHost = pReq.headers.host;
|
||||
|
||||
main.redirect({
|
||||
response: pRes,
|
||||
url: 'https://' + lHost + pReq.url
|
||||
url: lHTTPS + lHost + pReq.url
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -126,7 +128,7 @@
|
|||
lSockets(Server);
|
||||
|
||||
Server.listen(lSSLPort, lIP);
|
||||
lServerLog('https', lSSLPort);
|
||||
lServerLog(lHTTPS, lSSLPort);
|
||||
}
|
||||
else
|
||||
lHTTPServer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue