mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
minor changes
This commit is contained in:
parent
660af5f50a
commit
765b3a1dae
3 changed files with 816 additions and 794 deletions
22
cloudcmd.js
22
cloudcmd.js
|
|
@ -22,7 +22,9 @@
|
|||
|
||||
REQUEST = 'request',
|
||||
RESPONSE = 'response',
|
||||
INDEX = HTMLDIR + 'index.html';
|
||||
INDEX = HTMLDIR + 'index.html',
|
||||
FS = CloudFunc.FS,
|
||||
NO_JS = CloudFunc.NO_JS;
|
||||
|
||||
/* reinit main dir os if we on
|
||||
* Win32 should be backslashes */
|
||||
|
|
@ -182,22 +184,14 @@
|
|||
var lRet,
|
||||
lName = pParams.name;
|
||||
|
||||
if( Util.strCmp(lName, '/auth') ){
|
||||
if( Util.strCmp(lName, ['/auth', '/auth/github']) ){
|
||||
Util.log('* Routing' +
|
||||
'-> auth');
|
||||
|
||||
'-> ' + lName);
|
||||
pParams.name = main.HTMLDIR + lName + '.html';
|
||||
lRet = main.sendFile(pParams);
|
||||
}else if( Util.strCmp(lName, '/auth/github') ){
|
||||
Util.log('* Routing' +
|
||||
'-> github');
|
||||
|
||||
pParams.name = main.HTMLDIR + lName + '.html';
|
||||
lRet = main.sendFile(pParams);
|
||||
}else if( Util.isContainStr(lName, CloudFunc.FS) ||
|
||||
Util.isContainStr(lName, CloudFunc.NO_JS ) ||
|
||||
Util.strCmp(lName, '/') ||
|
||||
Util.strCmp(lName, 'json') ){
|
||||
}
|
||||
else if( Util.isContainStr(lName, [FS, NO_JS]) ||
|
||||
Util.strCmp( lName, ['/', 'json']) ){
|
||||
|
||||
lRet = main.commander.sendContent({
|
||||
request : pParams[REQUEST],
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
{
|
||||
"api_url" : "/api/v1",
|
||||
"appcache" : false,
|
||||
"minification" : {
|
||||
"js" : true,
|
||||
"css" : true,
|
||||
"html" : true,
|
||||
"img" : true
|
||||
},
|
||||
"logs" : false,
|
||||
"show_keys_panel" : true,
|
||||
"server" : true,
|
||||
"socket" : true,
|
||||
"port" : 80,
|
||||
"ip" : null,
|
||||
"rest" : true
|
||||
{
|
||||
"api_url" : "/api/v1",
|
||||
"appcache" : false,
|
||||
"minification" : {
|
||||
"js" : false,
|
||||
"css" : true,
|
||||
"html" : false,
|
||||
"img" : true
|
||||
},
|
||||
"logs" : false,
|
||||
"show_keys_panel" : true,
|
||||
"server" : true,
|
||||
"socket" : true,
|
||||
"port" : 80,
|
||||
"ip" : null,
|
||||
"rest" : true
|
||||
}
|
||||
1556
lib/util.js
1556
lib/util.js
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue