]> git.proxmox.com Git - proxmox-acme.git/blobdiff - src/PVE/ACME/Challenge.pm
config: always define a 'standalone' plugin instance
[proxmox-acme.git] / src / PVE / ACME / Challenge.pm
index 649c2284694da3f8290e4c7a5e1db489fa22048b..3fb8ab9cde5186232634ec67e2faaa38044cfb12 100644 (file)
@@ -31,6 +31,22 @@ sub private {
     return $defaultData;
 }
 
+sub parse_config {
+    my ($class, $filename, $raw) = @_;
+
+    my $cfg = $class->SUPER::parse_config($filename, $raw);
+    my $ids = $cfg->{ids};
+
+    # make sure we have a standalone plugin definition as fallback!
+    if (!$ids->{standalone} || $ids->{standalone}->{type} ne 'standalone') {
+       $ids->{standalone} = {
+           type => 'standalone',
+       };
+    }
+
+    return $cfg;
+}
+
 sub supported_challenge_types {
     return {};
 }