mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
ssl support 101
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user