Minor updates to SSL behavior
This commit is contained in:
parent
9541b40f68
commit
813ae3a2ef
4 changed files with 10 additions and 5 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue