]> git.proxmox.com Git - pmg-api.git/blobdiff - src/PMG/NodeConfig.pm
acme: handle wildcard dns validation
[pmg-api.git] / src / PMG / NodeConfig.pm
index 6472a9d07dd9605c3adccd1393cb4bd81ff284d0..5f96e62307be84cf3eda0a57544840e8d867c93e 100644 (file)
@@ -216,6 +216,12 @@ sub get_acme_conf {
                if !$plugins->{ids}->{$plugin_id};
        }
 
+       # validation for wildcard domain names happens on the domain w/o
+       # wildcard - see https://tools.ietf.org/html/rfc8555#section-7.1.3
+       if ($domain =~ /^\*\.(.*)$/ ) {
+           $res->{validationtarget}->{$1} = $domain;
+       }
+
        $parsed->{_configkey} = "acmedomain$index";
        $res->{domains}->{$domain} = $parsed;
     }