diff options
author | Francis Lavoie <lavofr@gmail.com> | 2022-05-06 10:50:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 10:50:26 -0400 |
commit | f6900fcf530e80c921dac8e4f09996cffce7f436 (patch) | |
tree | 6914d9a1038ff230f9047cae8d219838b6636d81 /modules/caddyhttp/reverseproxy/fastcgi | |
parent | ec86a2f7a3905c888b8c953255a98a50be70d5db (diff) |
reverseproxy: Support performing pre-check requests (#4739)
Diffstat (limited to 'modules/caddyhttp/reverseproxy/fastcgi')
-rw-r--r-- | modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go index 1b4cecf..96b84f2 100644 --- a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go +++ b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go @@ -196,7 +196,15 @@ 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) && dispenser.Nesting() == 1 { + for dispenser.NextBlock(0) { + // ignore any sub-subdirectives that might + // have the same name somewhere within + // the reverse_proxy passthrough tokens + if dispenser.Nesting() != 1 { + continue + } + + // parse the php_fastcgi subdirectives switch dispenser.Val() { case "root": if !dispenser.NextArg() { |