caddytls: Still provision permission module if ask is specified

Only needed for JSON configs, and only temporarily as the ask property is deprecated and will be removed.
This commit is contained in:
Matthew Holt 2024-04-13 17:08:11 -06:00
parent 567d96c624
commit dc9dd2e4b3
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5

View File

@ -192,6 +192,13 @@ func (t *TLS) Provision(ctx caddy.Context) error {
if err != nil {
return fmt.Errorf("preparing 'ask' endpoint: %v", err)
}
perm := PermissionByHTTP{
Endpoint: t.Automation.OnDemand.Ask,
}
if err := perm.Provision(ctx); err != nil {
return fmt.Errorf("provisioning 'ask' module: %v", err)
}
t.Automation.OnDemand.permission = perm
}
// automation/management policies