| 1 |
a.caddy.localhost { |
| 2 |
respond /version 200 { |
| 3 |
body "hello from localhost" |
| 4 |
} |
| 5 |
} |
| 6 |
---------- |
| 7 |
{ |
| 8 |
"apps": { |
| 9 |
"http": { |
| 10 |
"servers": { |
| 11 |
"srv0": { |
| 12 |
"listen": [ |
| 13 |
":443" |
| 14 |
], |
| 15 |
"routes": [ |
| 16 |
{ |
| 17 |
"match": [ |
| 18 |
{ |
| 19 |
"host": [ |
| 20 |
"a.caddy.localhost" |
| 21 |
] |
| 22 |
} |
| 23 |
], |
| 24 |
"handle": [ |
| 25 |
{ |
| 26 |
"handler": "subroute", |
| 27 |
"routes": [ |
| 28 |
{ |
| 29 |
"handle": [ |
| 30 |
{ |
| 31 |
"body": "hello from localhost", |
| 32 |
"handler": "static_response", |
| 33 |
"status_code": 200 |
| 34 |
} |
| 35 |
], |
| 36 |
"match": [ |
| 37 |
{ |
| 38 |
"path": [ |
| 39 |
"/version" |
| 40 |
] |
| 41 |
} |
| 42 |
] |
| 43 |
} |
| 44 |
] |
| 45 |
} |
| 46 |
], |
| 47 |
"terminal": true |
| 48 |
} |
| 49 |
] |
| 50 |
} |
| 51 |
} |
| 52 |
} |
| 53 |
} |
| 54 |
} |