summaryrefslogtreecommitdiff
path: root/caddyconfig/caddyfile
diff options
context:
space:
mode:
Diffstat (limited to 'caddyconfig/caddyfile')
-rwxr-xr-xcaddyconfig/caddyfile/dispenser.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/caddyconfig/caddyfile/dispenser.go b/caddyconfig/caddyfile/dispenser.go
index 6afbd77..5b90b73 100755
--- a/caddyconfig/caddyfile/dispenser.go
+++ b/caddyconfig/caddyfile/dispenser.go
@@ -275,6 +275,10 @@ func (d *Dispenser) NewFromNextTokens() *Dispenser {
if openedBlock {
// include closing brace accordingly
tkns = append(tkns, d.Token())
+ // since NewFromNextTokens is intended to consume the entire
+ // directive, we must call Next() here and consume the closing
+ // curly brace
+ d.Next()
}
return NewDispenser(tkns)
}