+ character should be encoded to %2B, but it changed to %20.
Routing Policy set as follows:
{ "name": "routing", "version": "builtin", "enabled": true, "configuration": { "rules": [ { "url": "https://echo-api.3scale.net:443", "owner_id": 2, "owner_type": "BackendApi", "condition": { "operations": [ { "match": "path", "op": "matches", "value": "^(/foo/.*|/foo/?)" } ] }, "replace_path": "{{uri | remove_first: '/foo'}}" } ] } },
Example request and response:
curl "https://api-3scale-apicast-staging.apps.example.com:443/foo/+1234?user_key=b54627820843566c0ebdb86d2d7a20b7" -k { "method": "GET", "path": "/%201234", "args": "user_key=b54627820843566c0ebdb86d2d7a20b7", "body": "", "headers": { "HTTP_VERSION": "HTTP/1.1", "HTTP_HOST": "echo-api.3scale.net", "HTTP_ACCEPT": "*/*", "HTTP_USER_AGENT": "curl/7.69.1", "HTTP_X_3SCALE_PROXY_SECRET_TOKEN": "Shared_secret_sent_from_proxy_to_API_backend_48c93e70ada1b37a", "HTTP_X_REAL_IP": "10.129.2.1", "HTTP_X_FORWARDED_FOR": "192.168.1.5, 203.0.113.192, 10.0.101.226", "HTTP_X_FORWARDED_HOST": "echo-api.3scale.net", "HTTP_X_FORWARDED_PORT": "443", "HTTP_X_FORWARDED_PROTO": "https", "HTTP_FORWARDED": "for=10.0.101.226;host=echo-api.3scale.net;proto=https" }, "uuid": "1efc9803-adb6-4ccd-8999-4f1a954862bf" }
- duplicates
-
THREESCALE-6834 Routing policy is changing the encoding of some characters in the upstream path
- To Develop
- is related to
-
THREESCALE-5454 APIaaP is causing URL encoding on API requests' paths
- Closed