Recognize if njs_acme_server_names no longer matches the stored certificate. If so, request a new cert with the configured names.
Also includes a handful of small changes for DRYing up (e.g. adds acmeCommonName(r) and acmeAltNames(r) methods), defines some more specific types, renames some variables/methods to be more accurate. Adds a second server name to the example config to demonstrate this clearly.
These changes ended up making the PR bigger than I expected. Happy to remove the changes to make this one lean.
TODO: Add unit tests when #24 is merged (contains unit test framework improvements).
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Proposed changes
Recognize if
njs_acme_server_names
no longer matches the stored certificate. If so, request a new cert with the configured names.Also includes a handful of small changes for DRYing up (e.g. adds
acmeCommonName(r)
andacmeAltNames(r)
methods), defines some more specific types, renames some variables/methods to be more accurate. Adds a second server name to the example config to demonstrate this clearly.These changes ended up making the PR bigger than I expected. Happy to remove the changes to make this one lean.
TODO: Add unit tests when #24 is merged (contains unit test framework improvements).
Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTING
documentREADME.md
andCHANGELOG.md
)