From 28f0a34e1e0e2633ac1daaf86d0e1d8f230ca1a6 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 11 Aug 2016 00:59:03 -0600 Subject: [PATCH] fix #1 use os.tmpdir() and use all defined options --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 891ed22..068c377 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,8 @@ var fs = require('fs'); var path = require('path'); var defaults = { - webrootPath: [ '~', 'letsencrypt', 'var', 'lib' ].join(path.sep) + //webrootPath: [ '~', 'letsencrypt', 'var', 'lib' ].join(path.sep) + webrootPath: require('os').tmpdir() + path.sep + 'acme-challenge' , debug: false }; @@ -19,7 +20,7 @@ Challenge.create = function (options) { results.create = undefined; Object.keys(defaults).forEach(function (key) { - if (!(key in options)) { + if ('undefined' !== typeof options[key]) { options[key] = defaults[key]; } });