summaryrefslogtreecommitdiff
path: root/caddytest/integration/caddyfile_adapt/sort_directives_within_handle.txt
diff options
context:
space:
mode:
Diffstat (limited to 'caddytest/integration/caddyfile_adapt/sort_directives_within_handle.txt')
-rw-r--r--caddytest/integration/caddyfile_adapt/sort_directives_within_handle.txt50
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",