aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddyconfig/httpcaddyfile/options.go
diff options
context:
space:
mode:
Diffstat (limited to 'caddyconfig/httpcaddyfile/options.go')
-rw-r--r--caddyconfig/httpcaddyfile/options.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/caddyconfig/httpcaddyfile/options.go b/caddyconfig/httpcaddyfile/options.go
index fa447f8dc..9ff62d07e 100644
--- a/caddyconfig/httpcaddyfile/options.go
+++ b/caddyconfig/httpcaddyfile/options.go
@@ -335,7 +335,8 @@ func parseOptOnDemand(d *caddyfile.Dispenser, _ any) (any, error) {
}
var ond *caddytls.OnDemandConfig
- for d.NextBlock(0) {
+
+ for nesting := d.Nesting(); d.NextBlock(nesting); {
switch d.Val() {
case "ask":
if !d.NextArg() {
@@ -344,7 +345,8 @@ func parseOptOnDemand(d *caddyfile.Dispenser, _ any) (any, error) {
if ond == nil {
ond = new(caddytls.OnDemandConfig)
}
- ond.Ask = d.Val()
+ perm := caddytls.PermissionByHTTP{Endpoint: d.Val()}
+ ond.PermissionRaw = caddyconfig.JSONModuleObject(perm, "module", "http", nil)
case "interval":
if !d.NextArg() {