summaryrefslogtreecommitdiff
path: root/caddyconfig/caddyfile
diff options
context:
space:
mode:
authorMatt Holt <mholt@users.noreply.github.com>2019-09-09 21:46:21 -0600
committerGitHub <noreply@github.com>2019-09-09 21:46:21 -0600
commit44b7ce98505ab8a34f6c632e661dd2cfae475a17 (patch)
tree4cd125e485047419fd19098007280b013906a0bc /caddyconfig/caddyfile
parent9169cd43d49236c69d5c9b7c556cb0ac0c9ce497 (diff)
parentb4f4fcd437c2f9816f9511217bde703679808679 (diff)
Merge pull request #2737 from caddyserver/fastcgi (reverse proxy!)
v2: Refactor reverse proxy and add FastCGI support
Diffstat (limited to 'caddyconfig/caddyfile')
-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)
}