From dc9dd2e4b3e266cb1267f672e3bcfd50c67cc3d4 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sat, 13 Apr 2024 17:08:11 -0600 Subject: [PATCH] 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. --- modules/caddytls/tls.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/caddytls/tls.go b/modules/caddytls/tls.go index 2ec7bd8f..bb4cd971 100644 --- a/modules/caddytls/tls.go +++ b/modules/caddytls/tls.go @@ -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