Tuesday, 6 November 2018

Xpost from r/aws. . . issue with gzipped responses from an API server

I have a node.js/Hapi server running in Lambda behind API Gateway. I have a a Swagger doc endpoint (which uses hapi-swaggered-ui) which returns binary garbage in a browser but looks perfectly fine with curl. Curl also handles the response correctly if I add an Accept-Encoding: gzip, deflate, br header provided that I also add the --compressed flag.I'm not sure why my browser is not handling the response correctly. Posting this here because I suspect that this may be an issue with my API Gateway/Lambda configuration.Any help is appreciated.

Submitted November 07, 2018 at 03:16AM by tech_tuna

No comments:

Post a Comment