nginx / njs-acme

Nginx NJS module runtime to work with ACME providers like Let's Encrypt for automated no-reload TLS certificate issue/renewal.
Apache License 2.0
57 stars 9 forks source link

Allow for a custom hostname validator #25

Open zsteinkamp opened 1 year ago

zsteinkamp commented 1 year ago

From @ivanitskiy:

here is an idea for you. let's have a callback on the client so users/developers can build their own validators (say they want to have allow list). from: https://github.com/auto-ssl/lua-resty-auto-ssl

auto_ssl:set("allow_domain", function(domain, auto_ssl, ssl_options, renewal)
  return ngx.re.match(domain, "^(example.com|example.net)$", "ijo")
end)

we can provide a default callback but allow people to make their own validations.