v0.6.5: return all on find({}), bugfix match

This commit is contained in:
AJ ONeal 2019-10-29 10:23:54 +00:00
parent 7fb336f989
commit 0ebc958305
2 changed files with 9 additions and 5 deletions

View File

@ -131,7 +131,7 @@ Manage.create = function(opts) {
altnames altnames
.slice(0) .slice(0)
.sort() .sort()
.join(' ') !== site.altnames.slice(0).sort.join(' ') .join(' ') !== site.altnames.slice(0).sort().join(' ')
) { ) {
// TODO signal to wait for renewal? // TODO signal to wait for renewal?
// it will definitely be renewed on the first request anyway // it will definitely be renewed on the first request anyway
@ -266,6 +266,7 @@ Manage.create = function(opts) {
//args.expiresBefore = Date.now() + 45 * 24 * 60 * 60 * 1000; //args.expiresBefore = Date.now() + 45 * 24 * 60 * 60 * 1000;
var issuedBefore = args.issuedBefore || Infinity; var issuedBefore = args.issuedBefore || Infinity;
var expiresBefore = args.expiresBefore || Infinity; //Date.now() + 21 * 24 * 60 * 60 * 1000; var expiresBefore = args.expiresBefore || Infinity; //Date.now() + 21 * 24 * 60 * 60 * 1000;
var all = !args.altnames;
var altnames = (args.altnames || args.domains || []).slice(0); var altnames = (args.altnames || args.domains || []).slice(0);
if (args.servername && !altnames.includes(args.servername)) { if (args.servername && !altnames.includes(args.servername)) {
@ -297,9 +298,12 @@ Manage.create = function(opts) {
} }
// altnames, servername, and wildname all get rolled into one // altnames, servername, and wildname all get rolled into one
return (site.altnames || []).some(function(name) { return (
all ||
(site.altnames || []).some(function(name) {
return altnames.includes(name); return altnames.includes(name);
}); })
);
}) })
.map(function(name) { .map(function(name) {
var site = config.sites[name]; var site = config.sites[name];

View File

@ -1,6 +1,6 @@
{ {
"name": "greenlock-manager-fs", "name": "greenlock-manager-fs",
"version": "0.6.4", "version": "0.6.5",
"description": "A simple file-based management strategy for Greenlock", "description": "A simple file-based management strategy for Greenlock",
"main": "manager.js", "main": "manager.js",
"scripts": { "scripts": {