From c7104249d34640b9cec242391b4768764d3bbae7 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 23 Dec 2013 10:01:57 +0000 Subject: [PATCH] feature(cloudcmd) add http authorization --- HELP.md | 3 +++ html/config.html | 3 +++ json/config.json | 3 +++ lib/server.js | 6 ++++-- lib/server/express.js | 39 ++++++++++++++++++++++++++++++++++++--- lib/server/rest.js | 12 +++++++++++- package.json | 3 ++- 7 files changed, 62 insertions(+), 7 deletions(-) diff --git a/HELP.md b/HELP.md index 6a681997..21000722 100644 --- a/HELP.md +++ b/HELP.md @@ -160,6 +160,9 @@ All main configuration could be done via [config.json](json/config.json "Config" ```js { + "auth" : false, /* enable http authorization */ + "username" : "root", /* username for authorization */ + "password" : "toor", /* password hash in sha-1 for authorization */ "apiURL" :"/api/v1", "appCache" : false, /* cache files for offline use */ "analytics" : true, /* google analytics suport */ diff --git a/html/config.html b/html/config.html index 14c9f056..e1f13572 100644 --- a/html/config.html +++ b/html/config.html @@ -1,5 +1,8 @@