Baoyuantop commented on issue #12960:
URL: https://github.com/apache/apisix/issues/12960#issuecomment-3869161793
In the HTTP protocol (RFC 3986), the character `|` is considered unsafe and
should be encoded as %7C in URLs. APISIX forwarding %7C itself is
standard-compliant and correct behavior. You may refer to the discussions in
#7386 and #9638.
For the current version, you can temporarily use the serverless plugin and
proxy-rewrite plugin to resolve this issue. Refer to the configuration below:
```
{
"plugins": {
"serverless-pre-function": {
"phase": "rewrite",
"functions": [
"return function(conf, ctx) local args = ngx.var.args; if
args and args:find('%%7C') then ngx.var.args = args:gsub('%%7C', '|') end end"
]
},
"proxy-rewrite": {
"uri": "$uri"
}
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]