mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-12 21:43:56 +08:00
c38a040e85
Co-authored-by: Francis Lavoie <lavofr@gmail.com>
78 lines
1.2 KiB
Plaintext
78 lines
1.2 KiB
Plaintext
:8881 {
|
|
route {
|
|
handle /foo/* {
|
|
respond "Foo"
|
|
}
|
|
handle {
|
|
respond "Bar"
|
|
}
|
|
}
|
|
}
|
|
----------
|
|
{
|
|
"apps": {
|
|
"http": {
|
|
"servers": {
|
|
"srv0": {
|
|
"listen": [
|
|
":8881"
|
|
],
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"group": "group2",
|
|
"handle": [
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"body": "Foo",
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"match": [
|
|
{
|
|
"path": [
|
|
"/foo/*"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"group": "group2",
|
|
"handle": [
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"body": "Bar",
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |