mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-26 21:53:48 +03:00
108 lines
No EOL
1.6 KiB
Text
108 lines
No EOL
1.6 KiB
Text
:8080
|
|
|
|
# With explicit wildcard matcher
|
|
route {
|
|
root * /a
|
|
}
|
|
|
|
# With path matcher
|
|
route {
|
|
root /path /b
|
|
}
|
|
|
|
# With named matcher
|
|
route {
|
|
@named method GET
|
|
root @named /c
|
|
}
|
|
|
|
# With no matcher, assumed to be wildcard
|
|
route {
|
|
root /d
|
|
}
|
|
----------
|
|
{
|
|
"apps": {
|
|
"http": {
|
|
"servers": {
|
|
"srv0": {
|
|
"listen": [
|
|
":8080"
|
|
],
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"handler": "vars",
|
|
"root": "/a"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"handler": "vars",
|
|
"root": "/b"
|
|
}
|
|
],
|
|
"match": [
|
|
{
|
|
"path": [
|
|
"/path"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"handler": "vars",
|
|
"root": "/c"
|
|
}
|
|
],
|
|
"match": [
|
|
{
|
|
"method": [
|
|
"GET"
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"handler": "subroute",
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"handler": "vars",
|
|
"root": "/d"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |