0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-01-06 22:40:31 -05:00
caddy/caddytest/integration/caddyfile_adapt/root_directive_permutations.txt

1.6 KiB

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