Closed bluthen closed 3 years ago
I put in some debug messages in serverless-wsgi.py and I see isBase64Encoded being set to true, so not sure what is happening.
I was too unfamiliar with lambda and binary encoding. In case anyone else gets this issue I needed to:
*/*
Adding audio/mpeg specifically was also not enough because I couldn't control what the browser sets in Accept header in this case.
You can do this also with a severless plugin: https://github.com/maciejtreder/serverless-apigw-binary
I was looking to send some generated binary data that needs to support byte-range requests. The following works fine in normal flask:
However in serverless-wsgi I get base64 encoded data from lambda instead of binary data I am expecting. I think the issue is serverless-wsgi is not setting the isBase64Encoded=true value when returning back from lambda. Is there a way this can be forced, maybe a header that is set. Or maybe it is an issue with the detection?