diff --git a/README.md b/README.md index 9743058..083feff 100644 --- a/README.md +++ b/README.md @@ -261,6 +261,8 @@ var lex = require('greenlock-express').create({ // Join the community to get notified of important updates and help me make greenlock better , communityMember: true + +, store: require('le-store-certbot').create({ webrootPath: '/tmp/acme-challenges' }) }); ``` @@ -268,12 +270,16 @@ The Automatic Certificate Issuance is initiated via SNI (`httpsOptions.SNICallba For security, domain validation MUST have an approval callback in *production*. ```javascript +var http01 = require('le-challenge-fs').create({ webrootPath: '/tmp/acme-challenges' }); function approveDomains(opts, certs, cb) { // This is where you check your database and associated // email addresses with domains and agreements and such + // Opt-in to submit stats and get important updates opts.communityMember = true; + opts.challenges = { 'http-01': http01 }; + // The domains being approved for the first time are listed in opts.domains // Certs being renewed are listed in certs.altnames if (certs) { diff --git a/lex.js b/lex.js index 751e2dc..d3211e9 100644 --- a/lex.js +++ b/lex.js @@ -68,7 +68,7 @@ module.exports.create = function (opts) { ports.forEach(function (p) { if (!(parseInt(p, 10) >= 0)) { console.warn("'" + p + "' doesn't seem to be a valid port number for https"); } promises.push(new PromiseA(function (resolve) { - var server = require('https').createServer(le.httpsOptions, le.middleware(le.app)).listen(p, function () { + var server = require('https').createServer(le.tlsOptions, le.middleware(le.app)).listen(p, function () { console.log("Success! Serving https on port '" + p + "'"); resolve(); }).on('error', function (e) {