How to set apigee to ignore merge slash in path

Hi,

I have and proxy endpoint like https://test1234/v1/test/{id}

and the {id} is base64 value, in this case {id} = T7UXi//9bYiR70I04=

but when proxy received the request it appear like  https://test1234/v1/test/T7UXi/9bYiR70I04=

it seems like it merge the double slash.

How can I resolve it if I want to send double slash in path

Thank You

Solved Solved
0 1 274
1 ACCEPTED SOLUTION

trying to figure out how to configure Apigee to handle double slashes.... may be doomed to failure. The Apigee MP, where your policies run,  may not receive the URL with the double slashes. Those slashes may be removed by actors or proxies (the router? a front-end load balancer?) prior to the Apigee MP ever receiving the URL. 

Suggestion: Maybe take a different tack? rather than base64, use base64URL to encode the value.  This is a URL-safe base64 encoding, it's designed specifically for the thing you're trying to do: encode data into a URL segment. The output of a base64url encoding will have no slashes. (And no trailing = (padding)).

 

View solution in original post

1 REPLY 1

trying to figure out how to configure Apigee to handle double slashes.... may be doomed to failure. The Apigee MP, where your policies run,  may not receive the URL with the double slashes. Those slashes may be removed by actors or proxies (the router? a front-end load balancer?) prior to the Apigee MP ever receiving the URL. 

Suggestion: Maybe take a different tack? rather than base64, use base64URL to encode the value.  This is a URL-safe base64 encoding, it's designed specifically for the thing you're trying to do: encode data into a URL segment. The output of a base64url encoding will have no slashes. (And no trailing = (padding)).