From ea50ca584c4bdf3c46a9740b7dd737607e2f270b Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 12 Aug 2016 03:56:19 -0400 Subject: [PATCH] explain more options --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8827e6..4cb6feb 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ All options are passed directly to `node-letsencrypt` (in other works, `leMaster` is a `letsencrypt` instance), but a few are only actually used by `letsencrypt-cluster`. -* `leMaster.approveDomains(options, certs, cb)` is special for `letsencrypt-cluster`, but will probably be included in `node-letsencrypt` in the future (no API change). +* `leOptions.approveDomains(options, certs, cb)` is special for `letsencrypt-cluster`, but will probably be included in `node-letsencrypt` in the future (no API change). * `leMaster.addWorker(worker)` is added by `letsencrypt-cluster` and **must be called** for each new worker. @@ -179,6 +179,19 @@ module.exports.init = function (sharedOpts) { }; ``` +### API + +`node-letsencrypt` is **not used** directly by the worker, +but certain options are shared because certain logic is duplicated. + +* `leOptions.renewWithin` is shared so that the worker knows how earlier to request a new cert +* `leOptions.renewBy` is passed to `le-sni-auto` so that it staggers renewals between `renewWithin` (latest) and `renewBy` (earlier) +* `leWorker.middleware(nextApp)` uses `letsencrypt/middleware` for GET-ing `http-01`, hence `sharedOptions.webrootPath` +* `leWorker.httpsOptions` has a default localhost certificate and the `SNICallback`. + +There are a few options that aren't shown in these examples, so if you need to change something +that isn't shown here, look at the code (it's not that much) or open an issue. + Message Passing ---------------