Fix --enable-dynamic-certificates for nested subdomain

This commit is contained in:
Maxime Ginters 2018-12-11 14:43:26 -05:00
parent 19b3b6be0c
commit ff8bfb6a86
2 changed files with 15 additions and 1 deletions

View file

@ -32,7 +32,7 @@ local function get_pem_cert_key(hostname)
return pem_cert_key
end
local wildcard_hosatname, _, err = re_sub(hostname, "^.+\\.", "*.", "jo")
local wildcard_hosatname, _, err = re_sub(hostname, "^[^\\.]+\\.", "*.", "jo")
if err then
ngx.log(ngx.ERR, "error: ", err)
return pem_cert_key