2020-05-15 00:53:28 +03:00
|
|
|
localhost:80
|
2024-03-06 02:37:14 +03:00
|
|
|
|
2020-05-15 00:53:28 +03:00
|
|
|
respond * "{header.content-type} {labels.0} {query.p} {path.0} {re.name.0}"
|
2024-03-06 02:37:14 +03:00
|
|
|
|
|
|
|
@match path_regexp ^/foo(.*)$
|
|
|
|
respond @match "{re.1}"
|
2020-05-15 00:53:28 +03:00
|
|
|
----------
|
|
|
|
{
|
|
|
|
"apps": {
|
|
|
|
"http": {
|
|
|
|
"servers": {
|
|
|
|
"srv0": {
|
|
|
|
"listen": [
|
|
|
|
":80"
|
|
|
|
],
|
|
|
|
"routes": [
|
|
|
|
{
|
|
|
|
"match": [
|
|
|
|
{
|
|
|
|
"host": [
|
|
|
|
"localhost"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"handle": [
|
|
|
|
{
|
|
|
|
"handler": "subroute",
|
|
|
|
"routes": [
|
2024-03-06 02:37:14 +03:00
|
|
|
{
|
|
|
|
"handle": [
|
|
|
|
{
|
|
|
|
"body": "{http.regexp.1}",
|
|
|
|
"handler": "static_response"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"match": [
|
|
|
|
{
|
|
|
|
"path_regexp": {
|
2024-04-17 21:19:14 +03:00
|
|
|
"name": "match",
|
2024-03-06 02:37:14 +03:00
|
|
|
"pattern": "^/foo(.*)$"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2020-05-15 00:53:28 +03:00
|
|
|
{
|
|
|
|
"handle": [
|
|
|
|
{
|
|
|
|
"body": "{http.request.header.content-type} {http.request.host.labels.0} {http.request.uri.query.p} {http.request.uri.path.0} {http.regexp.name.0}",
|
|
|
|
"handler": "static_response"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"terminal": true
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|