caddy/caddytest/integration/caddyfile_adapt/uri_replace_brace_escape.txt

47 lines
700 B
Plaintext
Raw Normal View History

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