summaryrefslogtreecommitdiff
path: root/caddytest
diff options
context:
space:
mode:
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/handle_path_sorting.txt105
1 files changed, 105 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/handle_path_sorting.txt b/caddytest/integration/caddyfile_adapt/handle_path_sorting.txt
new file mode 100644
index 0000000..3258dc9
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/handle_path_sorting.txt
@@ -0,0 +1,105 @@
+:80 {
+ handle /api/* {
+ respond "api"
+ }
+
+ handle_path /static/* {
+ respond "static"
+ }
+
+ handle {
+ respond "handle"
+ }
+}
+----------
+{
+ "apps": {
+ "http": {
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":80"
+ ],
+ "routes": [
+ {
+ "group": "group3",
+ "match": [
+ {
+ "path": [
+ "/static/*"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "handler": "subroute",
+ "routes": [
+ {
+ "handle": [
+ {
+ "handler": "rewrite",
+ "strip_path_prefix": "/static"
+ }
+ ]
+ },
+ {
+ "handle": [
+ {
+ "body": "static",
+ "handler": "static_response"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "group": "group3",
+ "match": [
+ {
+ "path": [
+ "/api/*"
+ ]
+ }
+ ],
+ "handle": [
+ {
+ "handler": "subroute",
+ "routes": [
+ {
+ "handle": [
+ {
+ "body": "api",
+ "handler": "static_response"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "group": "group3",
+ "handle": [
+ {
+ "handler": "subroute",
+ "routes": [
+ {
+ "handle": [
+ {
+ "body": "handle",
+ "handler": "static_response"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+} \ No newline at end of file