diff --git a/admin/index.html b/admin/index.html
index 2708d6a..fd28b5d 100644
--- a/admin/index.html
+++ b/admin/index.html
@@ -2,8 +2,14 @@
Telebit Relay
+
+
+
+
+
[TODO: Admin Interface]
+
diff --git a/admin/js/app.js b/admin/js/app.js
new file mode 100644
index 0000000..6d2c296
--- /dev/null
+++ b/admin/js/app.js
@@ -0,0 +1,6 @@
+(function () {
+'use strict';
+
+document.body.hidden = false;
+
+}());
diff --git a/bin/telebitd.js b/bin/telebitd.js
index 99c05b1..b6adc27 100755
--- a/bin/telebitd.js
+++ b/bin/telebitd.js
@@ -129,7 +129,7 @@ function applyConfig(config) {
, approveDomains: approveDomains
, configDir: state.config.greenlock.configDir
- , debug: true
+ , debug: state.config.debug || state.config.greenlock.debug
//, approvedDomains: program.servernames
diff --git a/handlers.js b/handlers.js
index 82c0788..cfa4785 100644
--- a/handlers.js
+++ b/handlers.js
@@ -118,8 +118,12 @@ module.exports.create = function (state) {
var serveAdmin = require('serve-static')(__dirname + '/admin', { redirect: true });
var finalhandler = require('finalhandler');
state.httpTunnelServer = http.createServer(function (req, res) {
- console.log('req.socket.encrypted', req.socket.encrypted);
- serveAdmin(req, res, finalhandler(req, res));
+ console.log('admin req.socket.encrypted', req.socket.encrypted);
+ res.setHeader('connection', 'close');
+ serveAdmin(req, res, function () {
+ console.log("serveAdmin fail");
+ finalhandler(req, res)
+ });
});
Object.keys(state.tlsOptions).forEach(function (key) {
tunnelAdminTlsOpts[key] = state.tlsOptions[key];