Node.js based forum software built for the modern web
ssl support 101
Baris Soner Usakli1466e68aa1ee
diff --git a/public/templates/footer.tpl b/public/templates/footer.tplindex ed17d6d878..9eb77e1cc4 100644--- a/public/templates/footer.tpl+++ b/public/templates/footer.tpl@@ -63,7 +63,7 @@<footer id="footer" class="container footer hide">{footerHTML}<div class="copyright">- Copyright © 2013 <a target="_blank" href="http://www.nodebb.com">NodeBB Forums</a> | <a target="_blank" href="//github.com/designcreateplay/NodeBB/graphs/contributors">Contributors</a>+ Copyright © 2013 <a target="_blank" href="https://www.nodebb.com">NodeBB Forums</a> | <a target="_blank" href="//github.com/designcreateplay/NodeBB/graphs/contributors">Contributors</a></div></footer>diff --git a/src/routes/api.js b/src/routes/api.jsindex 5ebe3dd9f1..ebe3f28055 100644--- a/src/routes/api.js+++ b/src/routes/api.js@@ -67,7 +67,7 @@ var path = require('path'),data.motd_class = (parseInt(meta.config.show_motd, 10) === 1 || meta.config.show_motd === undefined) ? '' : ' none';data.motd_class += (meta.config.motd && meta.config.motd.length > 0 ? '' : ' default');- data.motd = require('marked')(meta.config.motd || "<div class=\"pull-right btn-group\"><a target=\"_blank\" href=\"http://www.nodebb.org\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-comment\"></i><span class='hidden-mobile'> Get NodeBB</span></a> <a target=\"_blank\" href=\"https://github.com/designcreateplay/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-github\"></i><span class='hidden-mobile'> Fork us on Github</span></a> <a target=\"_blank\" href=\"https://twitter.com/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-twitter\"></i><span class='hidden-mobile'> @NodeBB</span></a></div>\n\n# NodeBB <span>v" + pkg.version + "</span>\nWelcome to NodeBB, the discussion platform of the future.");+ data.motd = require('marked')(meta.config.motd || "<div class=\"pull-right btn-group\"><a target=\"_blank\" href=\"https://www.nodebb.org\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-comment\"></i><span class='hidden-mobile'> Get NodeBB</span></a> <a target=\"_blank\" href=\"https://github.com/designcreateplay/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-github\"></i><span class='hidden-mobile'> Fork us on Github</span></a> <a target=\"_blank\" href=\"https://twitter.com/NodeBB\" class=\"btn btn-default btn-lg\"><i class=\"fa fa-twitter\"></i><span class='hidden-mobile'> @NodeBB</span></a></div>\n\n# NodeBB <span>v" + pkg.version + "</span>\nWelcome to NodeBB, the discussion platform of the future.");res.json(data);});});diff --git a/src/webserver.js b/src/webserver.jsindex a2d6de53ef..7ebe9c7753 100644--- a/src/webserver.js+++ b/src/webserver.js@@ -1,11 +1,10 @@var path = require('path'),fs = require('fs'),-+ nconf = require('nconf'),express = require('express'),express_namespace = require('express-namespace'),WebServer = express(),- server = require('http').createServer(WebServer),- nconf = require('nconf'),+ server,winston = require('winston'),validator = require('validator'),async = require('async'),@@ -30,6 +29,16 @@ var path = require('path'),plugins = require('./plugins'),logger = require('./logger');+if(nconf.get('ssl')) {+ server = require('https').createServer({+ key: fs.readFileSync(nconf.get('ssl').key),+ cert: fs.readFileSync(nconf.get('ssl').cert)+ }, WebServer);+} else {+ server = require('http').createServer(WebServer);+}++(function (app) {"use strict";