Debian Codegraph @

caddytest/integration/caddyfile_adapt/handle_path.caddyfiletest

raw
1 :80
2 handle_path /api/v1/* {
3 respond "API v1"
4 }
5 ----------
6 {
7 "apps": {
8 "http": {
9 "servers": {
10 "srv0": {
11 "listen": [
12 ":80"
13 ],
14 "routes": [
15 {
16 "match": [
17 {
18 "path": [
19 "/api/v1/*"
20 ]
21 }
22 ],
23 "handle": [
24 {
25 "handler": "subroute",
26 "routes": [
27 {
28 "handle": [
29 {
30 "handler": "rewrite",
31 "strip_path_prefix": "/api/v1"
32 }
33 ]
34 },
35 {
36 "handle": [
37 {
38 "body": "API v1",
39 "handler": "static_response"
40 }
41 ]
42 }
43 ]
44 }
45 ]
46 }
47 ]
48 }
49 }
50 }
51 }
52 }