feat: support dns-01 challenge
support dns-01 challenge.
we still need to return a wildcard domain in domain_whitelist/domain_whitelist_callback if we quire a wildcard domain cert, do you think the new way is ok?
we still need to return a wildcard domain in domain_whitelist/domain_whitelist_callback if we quire a wildcard domain cert, do you think the new way is ok?
I think you missed part of the code in commit, but I get your idea, it works for me. Basically we can do:
local WILDCARD_MATCHED = {}
function is_domain_whitelisted(domain)
if whitelist[domain] then
return domain
else if regex match then
return WILDCARD_MATCHED
end
return false
end
then
local matched = is_domain_whitelisted(domain)
if matched WILDCARD_MATCHED then
--is wildcard match
else if matched then
--is exact match
else
--not match
end
I will do a final cleanup of commits and merge to master https://github.com/fffonion/lua-resty-acme/pull/115
Thanks for this big PR, awesome work! @yuweizzz