3

I am currently integrating Amazon CloudSearch with a front end application. Due a known CORS issue, I am forced to use API Gateway too.

The issue occurs that, the front end CloudSearch library send the url with encode parameters. Those parameters are received by API Gateway, decoded and forwared to CloudSearch.

Is there a way to configure CloudSearch to accept a decoded slash? Is there a way to make API Gateway to not decode the parameter during forward?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Murilog
  • 31
  • 4

1 Answers1

0

I'm unable to determine the exact issue you are having without a specific example. I'm assuming that you're passing a query string parameter into API Gateway and then passing this parameter onto CloudSearch as another query string parameter.

Here is the expected behavior: When you pass a query string parameter in to API Gateway, it will first url decode the parameter value. This will decode any characters which were percent encoded, regardless of whether or not the original character needed to be percent encoded in order to conform to the URL RFC. If the parameter is being passed as a query string parameter to an integration endpoint, then API Gateway will URL encode the parameter value by percent encoding only the characters which are not valid characters to appear in a query string value.

Based on this behavior, it's not clear how a decoded slash is being passed to CloudFront. If you can provide a specific example, I can investigate further.

MikeD at AWS
  • 3,565
  • 16
  • 15