diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2023-11-01 17:57:48 +0100 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2023-11-01 18:11:33 +0100 |
commit | 240c3d1338415e5d82ef7ca0e52c4284be6441bd (patch) | |
tree | 4b0ee5d208c2cdffa78d65f1b0abe0ec85f15652 /caddytest/integration/caddyfile_adapt/sort_directives_within_handle.txt | |
parent | 73e78ab226f21e6c6c68961af88c4ab9c746f4f4 (diff) | |
parent | 0e204b730aa2b1fa0835336b1117eff8c420f713 (diff) |
Diffstat (limited to 'caddytest/integration/caddyfile_adapt/sort_directives_within_handle.txt')
-rw-r--r-- | caddytest/integration/caddyfile_adapt/sort_directives_within_handle.txt | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/caddytest/integration/caddyfile_adapt/sort_directives_within_handle.txt b/caddytest/integration/caddyfile_adapt/sort_directives_within_handle.txt index 0cf9d88..ac0d53c 100644 --- a/caddytest/integration/caddyfile_adapt/sort_directives_within_handle.txt +++ b/caddytest/integration/caddyfile_adapt/sort_directives_within_handle.txt @@ -1,12 +1,15 @@ *.example.com { @foo host foo.example.com handle @foo { - handle_path /strip* { + handle_path /strip { respond "this should be first" } - handle { + handle_path /strip* { respond "this should be second" } + handle { + respond "this should be last" + } } handle { respond "this should be last" @@ -35,13 +38,13 @@ "handler": "subroute", "routes": [ { - "group": "group5", + "group": "group6", "handle": [ { "handler": "subroute", "routes": [ { - "group": "group2", + "group": "group3", "handle": [ { "handler": "subroute", @@ -68,13 +71,13 @@ "match": [ { "path": [ - "/strip*" + "/strip" ] } ] }, { - "group": "group2", + "group": "group3", "handle": [ { "handler": "subroute", @@ -82,6 +85,14 @@ { "handle": [ { + "handler": "rewrite", + "strip_path_prefix": "/strip" + } + ] + }, + { + "handle": [ + { "body": "this should be second", "handler": "static_response" } @@ -89,6 +100,31 @@ } ] } + ], + "match": [ + { + "path": [ + "/strip*" + ] + } + ] + }, + { + "group": "group3", + "handle": [ + { + "handler": "subroute", + "routes": [ + { + "handle": [ + { + "body": "this should be last", + "handler": "static_response" + } + ] + } + ] + } ] } ] @@ -103,7 +139,7 @@ ] }, { - "group": "group5", + "group": "group6", "handle": [ { "handler": "subroute", |