diff --git a/HISTORY.rst b/HISTORY.rst
index 4b65c01..1ed117d 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -13,6 +13,9 @@ Pending Release
   (`docs <https://docs.python.org/3.8/library/importlib.metadata.html#distribution-versions>`__ /
   `backport <https://pypi.org/project/importlib-metadata/>`__).
 * Update Python support to 3.5-3.8.
+* Add `application/vnd.api+json` to default non-binary content type prefixes.
+* Add support for custom non-binary content type prefixes. This lets you control
+  which content types should be treated as plain text when binary support is enabled.
 
 2.3.0 (2019-08-19)
 ------------------
diff --git a/README.rst b/README.rst
index 8f54234..3404304 100644
--- a/README.rst
+++ b/README.rst
@@ -39,8 +39,8 @@ Python 3.5-3.8 supported.
 Usage
 =====
 
-``make_lambda_handler(app, binary_support=False)``
---------------------------------------------------
+``make_lambda_handler(app, binary_support=False, non_binary_content_type_prefixes=None)``
+-----------------------------------------------------------------------------------------
 
 ``app`` should be a WSGI app, for example from Django's ``wsgi.py`` or Flask's
 ``Flask()`` object.
@@ -53,8 +53,10 @@ using ``'*/*'`` is the best way to do it, since it is used to match the request
 'Accept' header as well, which WSGI applications are likely to ignore).
 
 Note that binary responses aren't sent if your response has a 'Content-Type'
-starting 'text/html' or 'application/json' - this is to support sending larger
-text responses.
+starting 'text/', 'application/json' or 'application/vnd.api+json' - this
+is to support sending larger text responses. To support other content types
+than the ones specified above, you can set `non_binary_content_type_prefixes`
+to a list of content type prefixes of your choice.
 
 If the event from API Gateway contains the ``requestContext`` key, for example
 from custom request authorizers, this will be available in the WSGI environ
diff --git a/src/apig_wsgi.py b/src/apig_wsgi.py
index e804a20..f6bd5ee 100644
--- a/src/apig_wsgi.py
+++ b/src/apig_wsgi.py
@@ -5,16 +5,41 @@ from urllib.parse import urlencode
 
 __all__ = ("make_lambda_handler",)
 
+DEFAULT_NON_BINARY_CONTENT_TYPE_PREFIXES = (
+    "text/",
+    "application/json",
+    "application/vnd.api+json",
+)
 
-def make_lambda_handler(wsgi_app, binary_support=False):
+
+def make_lambda_handler(
+    wsgi_app, binary_support=False, non_binary_content_type_prefixes=None
+):
     """
     Turn a WSGI app callable into a Lambda handler function suitable for
     running on API Gateway.
+
+    Parameters
+    ----------
+    wsgi_app : function
+        WSGI Application callable
+    binary_support : bool
+        Whether to support returning APIG-compatible binary responses
+    non_binary_content_type_prefixes : tuple of str
+        Tuple of content type prefixes which should be considered "Non-Binary" when
+        `binray_support` is True. This prevents apig_wsgi from unexpectedly encoding
+        non-binary responses as binary.
     """
+    if non_binary_content_type_prefixes is None:
+        non_binary_content_type_prefixes = DEFAULT_NON_BINARY_CONTENT_TYPE_PREFIXES
+    non_binary_content_type_prefixes = tuple(non_binary_content_type_prefixes)
 
     def handler(event, context):
         environ = get_environ(event, binary_support=binary_support)
-        response = Response(binary_support=binary_support)
+        response = Response(
+            binary_support=binary_support,
+            non_binary_content_type_prefixes=non_binary_content_type_prefixes,
+        )
         result = wsgi_app(environ, response.start_response)
         response.consume(result)
         return response.as_apig_response()
@@ -73,11 +98,12 @@ def get_environ(event, binary_support):
 
 
 class Response(object):
-    def __init__(self, binary_support):
+    def __init__(self, binary_support, non_binary_content_type_prefixes):
         self.status_code = 500
         self.headers = []
         self.body = BytesIO()
         self.binary_support = binary_support
+        self.non_binary_content_type_prefixes = non_binary_content_type_prefixes
 
     def start_response(self, status, response_headers, exc_info=None):
         if exc_info is not None:
@@ -113,8 +139,7 @@ class Response(object):
             return False
 
         content_type = self._get_content_type()
-        non_binary_content_types = ("text/", "application/json")
-        if not content_type.startswith(non_binary_content_types):
+        if not content_type.startswith(self.non_binary_content_type_prefixes):
             return True
 
         content_encoding = self._get_content_encoding()

diff --git a/tests/test_apig_wsgi.py b/tests/test_apig_wsgi.py
index 72531fd..f6b77e9 100644
--- a/tests/test_apig_wsgi.py
+++ b/tests/test_apig_wsgi.py
@@ -6,6 +6,8 @@ import pytest
 
 from apig_wsgi import make_lambda_handler
 
+CUSTOM_NON_BINARY_CONTENT_TYPE_PREFIXES = ["test/custom", "application/vnd.custom"]
+
 
 @pytest.fixture()
 def simple_app():
@@ -21,8 +23,14 @@ def simple_app():
     yield app
 
 
-parametrize_text_content_type = pytest.mark.parametrize(
-    "text_content_type", ["text/plain", "text/html", "application/json"]
+parametrize_default_text_content_type = pytest.mark.parametrize(
+    "text_content_type",
+    ["text/plain", "text/html", "application/json", "application/vnd.api+json"],
+)
+
+
+parametrize_custom_text_content_type = pytest.mark.parametrize(
+    "text_content_type", CUSTOM_NON_BINARY_CONTENT_TYPE_PREFIXES
 )
 
 
@@ -74,8 +82,8 @@ def test_get_missing_content_type(simple_app):
     assert response == {"statusCode": 200, "headers": {}, "body": "Hello World\n"}
 
 
-@parametrize_text_content_type
-def test_get_binary_support_text(simple_app, text_content_type):
+@parametrize_default_text_content_type
+def test_get_binary_support_default_text_content_types(simple_app, text_content_type):
     simple_app.handler = make_lambda_handler(simple_app, binary_support=True)
     simple_app.headers = [("Content-Type", text_content_type)]
 
@@ -87,6 +95,23 @@ def test_get_binary_support_text(simple_app, text_content_type):
     }
 
 
+@parametrize_custom_text_content_type
+def test_get_binary_support_custom_text_content_types(simple_app, text_content_type):
+    simple_app.handler = make_lambda_handler(
+        simple_app,
+        binary_support=True,
+        non_binary_content_type_prefixes=CUSTOM_NON_BINARY_CONTENT_TYPE_PREFIXES,
+    )
+    simple_app.headers = [("Content-Type", text_content_type)]
+
+    response = simple_app.handler(make_event(), None)
+    assert response == {
+        "statusCode": 200,
+        "headers": {"Content-Type": text_content_type},
+        "body": "Hello World\n",
+    }
+
+
 def test_get_binary_support_binary(simple_app):
     simple_app.handler = make_lambda_handler(simple_app, binary_support=True)
     simple_app.headers = [("Content-Type", "application/octet-stream")]
@@ -102,8 +127,8 @@ def test_get_binary_support_binary(simple_app):
     }
 
 
-@parametrize_text_content_type
-def test_get_binary_support_binary_text_with_gzip_content_encoding(
+@parametrize_default_text_content_type
+def test_get_binary_support_binary_default_text_with_gzip_content_encoding(
     simple_app, text_content_type
 ):
     simple_app.handler = make_lambda_handler(simple_app, binary_support=True)
@@ -123,6 +148,31 @@ def test_get_binary_support_binary_text_with_gzip_content_encoding(
     }
 
 
+@parametrize_custom_text_content_type
+def test_get_binary_support_binary_custom_text_with_gzip_content_encoding(
+    simple_app, text_content_type
+):
+    simple_app.handler = make_lambda_handler(
+        simple_app,
+        binary_support=True,
+        non_binary_content_type_prefixes=CUSTOM_NON_BINARY_CONTENT_TYPE_PREFIXES,
+    )
+    simple_app.headers = [
+        ("Content-Type", text_content_type),
+        ("Content-Encoding", "gzip"),
+    ]
+    simple_app.response = b"\x13\x37"
+
+    response = simple_app.handler(make_event(), None)
+
+    assert response == {
+        "statusCode": 200,
+        "headers": {"Content-Type": text_content_type, "Content-Encoding": "gzip"},
+        "body": b64encode(b"\x13\x37").decode("utf-8"),
+        "isBase64Encoded": True,
+    }
+
+
 def test_get_binary_support_no_content_type(simple_app):
     simple_app.handler = make_lambda_handler(simple_app, binary_support=True)
     simple_app.headers = []

Ability to have custom white list for non binary content types
## Problem

The `Response` class has a whitelist of "non binary content types" which includes:
  - `text/*`
  - `application/json`

https://github.com/adamchainz/apig-wsgi/blob/f24dd8df21a4ab693992ababf4cfb9735af27b57/src/apig_wsgi.py#L116

All other response types are assumed to be binary if `binary_support` is True.

This becomes a problem if you want to return text content for other content types. For example, [JSON:API](https://jsonapi.org/) APIs have `application/vnd.api+json` content type.

## Possible solution

The library should provide ability to either extend the `Response` class or pass the `non_binary_content_types` directly to `make_lambda_handler` call.

```python
wsgi_handler = make_lambda_handler(application, binary_support=True, response_class=MyResponse)

wsgi_handler = make_lambda_handler(application, binary_support=True, non_binary_content_types=my_content_type_list)
```

I can create PR for either of these approaches.

What do you think?
tests/test_apig_wsgi.py::test_get_binary_support_default_text_content_types[application/vnd.api+json] tests/test_apig_wsgi.py::test_get_binary_support_custom_text_content_types[test/custom] tests/test_apig_wsgi.py::test_get_binary_support_custom_text_content_types[application/vnd.custom] tests/test_apig_wsgi.py::test_get_binary_support_binary_custom_text_with_gzip_content_encoding[test/custom] tests/test_apig_wsgi.py::test_get_binary_support_binary_custom_text_with_gzip_content_encoding[application/vnd.custom]
tests/test_apig_wsgi.py::test_get tests/test_apig_wsgi.py::test_get_missing_content_type tests/test_apig_wsgi.py::test_get_binary_support_default_text_content_types[text/plain] tests/test_apig_wsgi.py::test_get_binary_support_default_text_content_types[text/html] tests/test_apig_wsgi.py::test_get_binary_support_default_text_content_types[application/json] tests/test_apig_wsgi.py::test_get_binary_support_binary tests/test_apig_wsgi.py::test_get_binary_support_binary_default_text_with_gzip_content_encoding[text/plain] tests/test_apig_wsgi.py::test_get_binary_support_binary_default_text_with_gzip_content_encoding[text/html] tests/test_apig_wsgi.py::test_get_binary_support_binary_default_text_with_gzip_content_encoding[application/json] tests/test_apig_wsgi.py::test_get_binary_support_binary_default_text_with_gzip_content_encoding[application/vnd.api+json] tests/test_apig_wsgi.py::test_get_binary_support_no_content_type tests/test_apig_wsgi.py::test_post tests/test_apig_wsgi.py::test_post_binary_support tests/test_apig_wsgi.py::test_querystring_none tests/test_apig_wsgi.py::test_querystring_empty tests/test_apig_wsgi.py::test_querystring_one tests/test_apig_wsgi.py::test_plain_header tests/test_apig_wsgi.py::test_special_headers tests/test_apig_wsgi.py::test_no_headers tests/test_apig_wsgi.py::test_headers_None tests/test_apig_wsgi.py::test_exc_info tests/test_apig_wsgi.py::test_request_context