jordaneremieff / mangum

AWS Lambda support for ASGI applications
https://mangum.io/
MIT License
1.67k stars 119 forks source link

Custom text mime types #270

Closed khamaileon closed 2 years ago

khamaileon commented 2 years ago

There is no longer the possibility to configure which type of content should not be base64 encoded. I need to ignore the "application/vnd.oai.openapi" format which is used by redoc. Also the doc is not up to date as it is stated that it is still possible to pass TEXT_MIME_TYPES.

khamaileon commented 2 years ago

I'm willing to do an PR. @jordaneremieff What's the solution for you? Simply add the missing mime type or resume TEXT_MIME_TYPES parameter?

jordaneremieff commented 2 years ago

Thanks @khamaileon. Do you know why this might not have come up previously?

My preference is to have it added to the default text mime types unless there is some other use-case that would be relying on the existing behavior.

khamaileon commented 2 years ago

I honestly don't know. Maybe it's too specific. Maybe people have had the problem but not identified it. Maybe they are using mangun for something else than a REST API. Personally I already had the problem with WSGI. I was using apig_wsgi and there was a parameter for it.

Here is the PR: https://github.com/jordaneremieff/mangum/pull/271

jordaneremieff commented 2 years ago

Released in 0.15.1. Thanks.