Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

stop Apigee from uncompressing files

This is a bit of a specific situation. I have an event driven API that receives payloads of certain data from a 3rd party API. This goes through an API proxy, which Apigee in this case. The payload is compressed and Apigee automatically decompresses it. The issue is that sometimes the payload when decompressed exceeds the payload limit in terms of size, which prompts an error. The decompression happens before any policy is triggered so I can't do anything about it. The request header responsible for causing the decompression is Content-Encoding which is set to blank, I know this is very specific and I have so little degree of freedom to change, but do you guys have any suggestions ?
The setting we have tried :

  1. Get rid of the Content- Encoding  header before the request is processed by APIGEE

{

             "Set-Request-Header": {

                            "name": "Content-Encoding",

                            "value": ""

             }

}

 

  1. Ignore-Content- Encoding  -If request is getting forwarded to backend target. In this case setting the Ignore-Content- Encoding flag might work.

{

             "ServiceCallout": {

                            "Request": {

                                          "Set-Header": {

                                                         "name": "Content-Encoding",

                                                         "value": "gzip"

                                          }

                            },

                            "Ignore-Content-Encoding": "true",

                            "Timeout": "30000",

                            "name": "A2C"

             }

}
None worked so far. 
Any suggestion as this is something we would like to fix ASAP

0 5 1,461
5 REPLIES 5