From a779e1b38390205e8286a0578042646d858039a5 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Sat, 11 Sep 2021 16:12:21 -0400 Subject: fastcgi: Fix Caddyfile parsing when `handle_response` is used (#4342) --- modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/caddyhttp/reverseproxy') diff --git a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go index 0ccd9fe..da1c92d 100644 --- a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go +++ b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go @@ -192,7 +192,7 @@ func parsePHPFastCGI(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error // NOTE: we delete the tokens as we go so that the reverse_proxy // unmarshal doesn't see these subdirectives which it cannot handle for dispenser.Next() { - for dispenser.NextBlock(0) { + for dispenser.NextBlock(0) && dispenser.Nesting() == 1 { switch dispenser.Val() { case "root": if !dispenser.NextArg() { -- cgit v1.2.3