caddy/caddytest/integration/caddyfile_adapt/root_directive_permutations.caddyfiletest

108 lines
1.6 KiB
Plaintext

: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"
}
]
}
]
}
]
}
]
}
}
}
}
}