use better renewWithin/By defaults, document access

This commit is contained in:
AJ ONeal 2018-04-19 13:37:27 -06:00
parent 96ef6ab36e
commit 772dd22516
3 changed files with 8 additions and 7 deletions

View File

@ -10,12 +10,8 @@ Now supports **Let's Encrypt v2**!!
| [greenlock-cluster](https://git.coolaj86.com/coolaj86/greenlock-cluster.js)
| [greenlock-koa](https://git.coolaj86.com/coolaj86/greenlock-koa.js)
| [greenlock-hapi](https://git.coolaj86.com/coolaj86/greenlock-hapi.js)
<<<<<<< HEAD
| Sponsored by [ppl](https://ppl.family). Created at [Daplie](https://dapliefounder.com).
=======
| Sponsored by [ppl](https://ppl.family)
>>>>>>> 84e21d2385da4e2260befd1c91ac4564e1e21301
Automatic [Let's Encrypt](https://letsencrypt.org) (ACME) HTTPS / TLS / SSL Certificates for node.js
@ -154,6 +150,11 @@ le = LE.create({
, challengeType: 'http-01' // default to this challenge type
, agreeToTerms: leAgree // hook to allow user to view and accept LE TOS
//, sni: require('le-sni-auto').create({}) // handles sni callback
// renewals happen at a random time within this window
, renewWithin: 14 * 24 * 60 * 60 * 1000 // certificate renewal may begin at this time
, renewBy: 10 * 24 * 60 * 60 * 1000 // certificate renewal should happen by this time
, debug: false
//, log: function (debug) {console.log.apply(console, args);} // handles debug outputs
});

View File

@ -107,7 +107,7 @@ LE.create = function (le) {
agreeCb(new Error("'agreeToTerms' was not supplied to LE and 'agreeTos' was not supplied to LE.register"));
};
if (!le.renewWithin) { le.renewWithin = 7 * DAY; }
if (!le.renewWithin) { le.renewWithin = 14 * DAY; }
// renewBy has a default in le-sni-auto
if (!le.server) {

View File

@ -1,6 +1,6 @@
{
"name": "greenlock",
"version": "2.2.2",
"version": "2.2.3",
"description": "Let's Encrypt for node.js on npm",
"main": "index.js",
"scripts": {
@ -64,7 +64,7 @@
"le-acme-core": "^2.1.2",
"le-challenge-fs": "^2.0.2",
"le-challenge-sni": "^2.0.0",
"le-sni-auto": "^2.1.0",
"le-sni-auto": "^2.1.3",
"le-store-certbot": "^2.0.3",
"localhost.daplie.me-certificates": "^1.3.0",
"node.extend": "^1.1.5",