strongloop / microgateway

IBM API Connect Microgateway framework, built on Node.js & Nginx
https://developer.ibm.com/apiconnect
Other
1.19k stars 181 forks source link

Accept-Encoding gzip not working #108

Open ghost opened 6 years ago

ghost commented 6 years ago

We have an API that uses the Invoke policy to make a call out to a Bluemix Cloudant database. Recently that API was updated to return gzip encoded data, this caused our code in the microgateway to fail. After the Invoke policy we have a Javascript policy and our reference to message.body.id now fails.

To workaround this we now use a Set-Variable policy to set request.headers.accept-encoding to gzip;q=0 and now our Javascript policy code works again.

Should the Invoke policy support data returned compressed? What is the IBM best practice for this? I am sure it is not to disable compression like we did.

Thanks in advance

ozairs commented 6 years ago

Sorry for the late reply ... will follow up with our Development team.