caddy/caddytest/integration/caddyfile_adapt/uri_replace_brace_escape.caddyfiletest

47 lines
No EOL
700 B
Text

:9080
uri replace "\}" %7D
uri replace "\{" %7B
respond "{query}"
----------
{
"apps": {
"http": {
"servers": {
"srv0": {
"listen": [
":9080"
],
"routes": [
{
"handle": [
{
"handler": "rewrite",
"uri_substring": [
{
"find": "\\}",
"replace": "%7D"
}
]
},
{
"handler": "rewrite",
"uri_substring": [
{
"find": "\\{",
"replace": "%7B"
}
]
},
{
"body": "{http.request.uri.query}",
"handler": "static_response"
}
]
}
]
}
}
}
}
}