From 7233d3809088adfa9068649bc1ad0a606bbbbe67 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 29 Oct 2019 01:32:40 -0600 Subject: [PATCH] add wildname support --- greenlock.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/greenlock.js b/greenlock.js index 5e03c6b..66cc9d7 100644 --- a/greenlock.js +++ b/greenlock.js @@ -231,9 +231,16 @@ G.create = function(gconf) { }; greenlock._single = function(args) { - if (!args.servername) { + if ('string' !== typeof args.servername) { return Promise.reject(new Error('no servername given')); } + // www.example.com => *.example.com + args.wildname = + '*.' + + args.servername + .split('.') + .slice(1) + .join('.'); if ( args.servernames || args.subject ||