diff options
author | WeidiDeng <weidi_deng@icloud.com> | 2023-01-19 05:04:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 16:04:41 -0500 |
commit | c38a040e85a7d277299acaab39bdad171bc45675 (patch) | |
tree | bc1b7a6f41cc5bfc7be980d159b403d24457420c /caddytest/integration/caddyfile_adapt/handle_nested_in_route.txt | |
parent | e8ad9b32c9730ddb162b6fb1443fc0b36fcef7dc (diff) |
httpcaddyfile: Fix `handle` grouping inside `route` (#5315)
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
Diffstat (limited to 'caddytest/integration/caddyfile_adapt/handle_nested_in_route.txt')
-rw-r--r-- | caddytest/integration/caddyfile_adapt/handle_nested_in_route.txt | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/handle_nested_in_route.txt b/caddytest/integration/caddyfile_adapt/handle_nested_in_route.txt new file mode 100644 index 0000000..1f77d5c --- /dev/null +++ b/caddytest/integration/caddyfile_adapt/handle_nested_in_route.txt @@ -0,0 +1,78 @@ +:8881 { + route { + handle /foo/* { + respond "Foo" + } + handle { + respond "Bar" + } + } +} +---------- +{ + "apps": { + "http": { + "servers": { + "srv0": { + "listen": [ + ":8881" + ], + "routes": [ + { + "handle": [ + { + "handler": "subroute", + "routes": [ + { + "group": "group2", + "handle": [ + { + "handler": "subroute", + "routes": [ + { + "handle": [ + { + "body": "Foo", + "handler": "static_response" + } + ] + } + ] + } + ], + "match": [ + { + "path": [ + "/foo/*" + ] + } + ] + }, + { + "group": "group2", + "handle": [ + { + "handler": "subroute", + "routes": [ + { + "handle": [ + { + "body": "Bar", + "handler": "static_response" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + } + } + } +}
\ No newline at end of file |