WSGI middleware to protect against a JSON vulnerability