summaryrefslogtreecommitdiff
path: root/caddyconfig
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-09 12:23:27 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-09 12:23:27 -0600
commit50e62d06bcbc6b6486b382a22c633772443cfb6d (patch)
treef5ebf9bbbf4d0f4d9098c8db2f67e0b8808f4ffa /caddyconfig
parentf6126acf379963136a6caeb818296a7510abd532 (diff)
reverse_proxy: Caddyfile integration (and fix blocks in Dispenser)
Diffstat (limited to 'caddyconfig')
-rwxr-xr-xcaddyconfig/caddyfile/dispenser.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/caddyconfig/caddyfile/dispenser.go b/caddyconfig/caddyfile/dispenser.go
index 93f451e..938c985 100755
--- a/caddyconfig/caddyfile/dispenser.go
+++ b/caddyconfig/caddyfile/dispenser.go
@@ -236,18 +236,13 @@ func (d *Dispenser) NewFromNextTokens() *Dispenser {
for d.NextArg() {
tkns = append(tkns, d.Token())
}
- if d.Next() && d.Val() == "{" {
- tkns = append(tkns, d.Token())
- for d.NextBlock() {
- for d.Nested() {
- tkns = append(tkns, d.Token())
- d.NextBlock()
- }
+ for d.NextBlock() {
+ for d.Nested() {
+ tkns = append(tkns, d.Token())
+ d.NextBlock()
}
- tkns = append(tkns, d.Token())
- } else {
- d.cursor--
}
+ tkns = append(tkns, d.Token())
return NewDispenser(tkns)
}