2
1
mirror of https://github.com/therootcompany/greenlock-express.js.git synced 2025-04-09 09:00:41 +00:00

printing primitive arrays in opts in one line

This fixes  and prints all arrays that contain only primitive values in one line like the key or cert buffer
This commit is contained in:
F. N 2016-02-16 23:04:56 +01:00
parent e6e38f3ada
commit d81a2d0919

@ -19,8 +19,13 @@ module.exports.create = function (opts) {
if (!opts) { throw new Error("requires opts to be an object"); }
if (opts.debug) {
console.debug("[LEX] creating sniCallback", JSON.stringify(opts, null, ' '));
console.debug("[LEX] creating sniCallback", JSON.stringify(opts, function(k,v){
if(v instanceof Array)
return JSON.stringify(v);
return v;
},' '));
}
if (!opts.letsencrypt) { throw new Error("requires opts.letsencrypt to be a letsencrypt instance"); }
if (!opts.lifetime) { opts.lifetime = 90 * 24 * 60 * 60 * 1000; }