Minor updates to SSL behavior

This commit is contained in:
calzoneman 2015-03-29 11:34:27 -05:00
parent 9541b40f68
commit 813ae3a2ef
4 changed files with 10 additions and 5 deletions

View file

@ -44,7 +44,8 @@ var defaults = {
passphrase: "",
certfile: "localhost.cert",
cafile: "",
ciphers: "HIGH:!DSS:!aNULL@STRENGTH"
ciphers: "HIGH:!DSS:!aNULL@STRENGTH",
redirect: true
},
io: {
domain: "http://localhost",

View file

@ -46,7 +46,7 @@ function ipForRequest(req) {
* Redirects a request to HTTPS if the server supports it
*/
function redirectHttps(req, res) {
if (!req.secure && Config.get("https.enabled")) {
if (!req.secure && Config.get("https.enabled") && Config.get("https.redirect")) {
var ssldomain = Config.get("https.full-address");
if (ssldomain.indexOf(req.hostname) < 0) {
return false;