mirror of https://github.com/calzoneman/sync.git
Fix ENOENT for people with HTTPS disabled
This commit is contained in:
parent
85c62b1579
commit
7c252eab2f
|
@ -70,15 +70,17 @@ var Server = function () {
|
|||
require("./web/webserver").init(self.express);
|
||||
|
||||
// http/https/sio server init -----------------------------------------
|
||||
var key = fs.readFileSync(path.resolve(__dirname, "..",
|
||||
var key = "", cert = "", ca = undefined;
|
||||
if (Config.get("https.enabled")) {
|
||||
key = fs.readFileSync(path.resolve(__dirname, "..",
|
||||
Config.get("https.keyfile")));
|
||||
var cert = fs.readFileSync(path.resolve(__dirname, "..",
|
||||
cert = fs.readFileSync(path.resolve(__dirname, "..",
|
||||
Config.get("https.certfile")));
|
||||
var ca = undefined;
|
||||
if (Config.get("https.cafile")) {
|
||||
ca = fs.readFileSync(path.resolve(__dirname, "..",
|
||||
Config.get("https.cafile")));
|
||||
}
|
||||
}
|
||||
|
||||
var opts = {
|
||||
key: key,
|
||||
|
|
Loading…
Reference in New Issue